SciTE Step by Step Script ablauf

    • Offizieller Beitrag

    Hier ein Auszug aus der Hilfe:

    Zitat

    Ctrl+Shift+D - Add Debug msgbox
    This function will add a MSGBOX below the current line that contains the Var the cursor is at
    $a = $b + 1 (Put the cursor on $b and press Ctrl+Shift+D the following line will be added)
    MsgBox(4096,'debug:' & $b,$b) ;### Debug MSGBOX

    auf deutsch:
    Setze den Cursor vor die Variable, die du überwachen willst und drücke STRG+SHIFT+D. Es wird eine Messagebox eingefügt, die dir den Wert der Variable ausgibt.
    Um Fehler zu verfolgen ist "Extras" "Trace: Add Trace Lines" vllt. die bessere Wahl. Mußt du dir ausprobieren.

    Edit:
    Du kannst dir die Werte einer Variablen auch auf die Console ausgeben lassen. Ist besser, wenn die Variable z.B. in einer Schleife liegt, müßtest du jedes mal die MsgBox anklicken.
    Ausgabe an Console: Cursor vor Variable, ALT+D
    Hab mal ein Beispiel angehängt, wie das aussieht:

    Spoiler anzeigen
    [autoit]

    $string= "abc,+12-tzr563Q><?9" ;num=125639
    $zahl= _StringNumExtract($string)
    MsgBox(0,"","numerisch: "&$zahl[1]& @LF &"nichtnumerisch: "&$zahl[2])

    [/autoit] [autoit][/autoit] [autoit]

    Func _StringNumExtract($fullstring)
    Dim $array[3]
    $num=""
    $nonum=""
    $len=StringLen($fullstring)
    For $i=1 To $len
    $pos=StringMid($fullstring,$i,1)
    If StringIsDigit($pos) Then
    $num=$num&$pos
    ConsoleWrite('@@ Debug(13) : $num = ' & $num & @lf & '>Error code: ' & @error & @lf) ;### Debug Console
    Else
    $nonum=$nonum&$pos
    EndIf
    Next
    If $num <>"" Then
    $array[1]= $num
    $array[0]= 0 ; numerische Elemente enthalten
    Else
    $array[0]= -1 ; String enthält keine numerischen Elemente
    EndIf
    $array[2]= $nonum ; alle nichtnumerischen Elemente
    Return $array ; Rückgabe Array [0] enthält Status 0 od. -1; [1] enthält num. Teil; [2] enthält nichtnum. Teil
    EndFunc

    [/autoit][autoit]

    >"H:\Programme\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "H:\Dokumente und Einstellungen\Worker_Admin\Desktop\_AU3\TEST.au3" /autoit3dir "H:\Programme\AutoIt3" /UserParams
    +> Starting AutoIt3Wrapper v.1.7.1
    >Running AU3Check (1.54.3.0) params: from:H:\Programme\AutoIt3
    +>AU3Check ended.rc:0
    >Running:(3.2.0.1):H:\Programme\AutoIt3\autoit3.exe "H:\Dokumente und Einstellungen\Worker_Admin\Desktop\_AU3\TEST.au3"
    @@ Debug(13) : $num = 1
    >Error code: 0
    @@ Debug(13) : $num = 12
    >Error code: 0
    @@ Debug(13) : $num = 125
    >Error code: 0
    @@ Debug(13) : $num = 1256
    >Error code: 0
    @@ Debug(13) : $num = 12563
    >Error code: 0
    @@ Debug(13) : $num = 125639
    >Error code: 0
    +>AutoIT3.exe ended.rc:0
    >Exit code: 0 Time: 4.401

    [/autoit]