Error Handler

  • hi alle,

    wenn bei einem kompilierten script ein fehler auftritt wie kann ich die zeilennummer z.b. in einer msgbox oder datei ausgeben lassen ?
    habe bisher nur das gefunden

    Spoiler anzeigen
    [autoit]


    $oMyError = ObjEvent("AutoIt.Error","MyErrFunc"); Install a custom error handler
    Func MyErrFunc()
    $HexNumber=hex($oMyError.number,8)
    Msgbox(0,"","We intercepted a COM Error !" & @CRLF & _
    "Number is: " & $HexNumber & @CRLF & _
    "Linenbr is: " & $oMyError.scriptline & @CRLF & _
    "Description is: " & $oMyError.description & @CRLF & _
    "Windescription is: " & $oMyError.windescription )

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

    SetError(1); something to check for when this function returns
    Endfunc

    [/autoit]


    leider kommt keine msgbox, prog wird zwar fortgesetzt aber mit fehlern
    ich suche soetwas wie eine globale error_handling routine die mir die zeilennummer ausgibt oder den art des fehlers mit der variable

    bitte um hilfe

    thx neon

  • sorry aber ich finde nur einen debugmode im scite tools menue
    ich brauche aber etwas das in der exe drin ist und mir fehler meldet

    trotzdem danke

  • Ich find da kein Debug im Tools Menü von SciTe ?( .Was mach ich falsch? Stimmt vllt. ne Einstellung nicht?
    Edit: @Xeno: Das mit dem in der Trayleiste anzeigen geht schon, aber bei Tools steht nix von Debuggen.
    Nur Compile, Build, Go, SyntaxCheck Prod, Stop Executing, Next Message, Previous Message, Clear Output und Switch Pane(was immer das auch heißen mag).
    Ich habe die Version 1.71 vom Sep 10 2007 15:59:04 (Cool da hab ich Geburtstag :D)

    Projekte: Keine größeren (und fertigen)
    Gegen Internetzensur:
    https://epetitionen.bundestag.de/index.php?acti…s;petition=3860
    (Zeichnungsfrist abgelaufen)
    __________________________________________________________________________________________________________________________________
    Dieser Beitrag wurde bereits 264 mal editiert, zuletzt von »Fast2« (30. Februar 2009, 12:99)

    Einmal editiert, zuletzt von Fast2 (26. Dezember 2007 um 20:56)

  • thx mega,
    aber, egal wo ich absichtlich nen fehler einbau, msgbox sagt immer "line:-1"

    ich hab das problem das ein script auf 3 rechnern läuft auf 1 nicht
    (win ver. und sp. admin rechte, different folders, all checked...)

    was ach ich falsch ???? ---- Opt("TrayIconDebug", 1)

    Fast2 SciTE Version 1.74 Jun 18 2007 09:32:23 ?

    thx neon

    • Offizieller Beitrag

    Hi!

    Solche Fehler sollte man sowieso vorher abfangen nachdem das Skript ja damit abstürzt. Anhand der Quelltextzeile kann man die Zeilennummer doch in der Regel auskombinieren.
    Aber der Rat wie gesagt: Den Fehler im Skript abfangen (@error, @extended, Rückgabewerte) und dann den Nutzer sauber informieren oder das Skript kontrolliert beenden.

    peethebee

  • peethebee, nur was tun wenn das script bei mir auf 2 pc läuft auf 3 anderen auch, nur auf einem nicht ???

    Spoiler anzeigen
    [autoit]


    ;~ #NoTrayIcon
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #AutoIt3Wrapper_icon=schloss.ico
    #AutoIt3Wrapper_outfile=SICK_032.exe
    #AutoIt3Wrapper_Res_Comment=none
    #AutoIt3Wrapper_Res_LegalCopyright=
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    #include <INet.au3>
    #include <array.au3>
    #include <File.au3>

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

    Opt("TrayIconDebug", 1)

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

    fileinstall("updater.exe",@ProgramFilesDir & "\updater.exe")

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

    dim $label, $num, $codes, $prem, $zaehler1, $lines, $i, $zaehler, $output, $write
    $num=0
    $output='c:\softcam\neon.key'

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

    ;___main start_______________________________________________________________________________________________________
    GUISetFont (10, 000, 0, "Arial")
    GUICreate(" S . I . C . K . Softcam Independet Cool Key's v 0.32",610,250)

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

    ;show gui
    GUISetFont (8, 000, 0, "Arial")
    GUICtrlCreateLabel("compiled by neon , ALL RIGHTS AND BEER'S RESERVED, PROVIDED <=> AS IS <=> WITHOUT WARRANTY OF ANY KIND",10,180,600,15,$ES_READONLY)
    GUICtrlSetColor(-1,0xaaaaaa)
    GUISetFont (10, 000, 0, "Arial")
    $ping_btn = GUICtrlCreateButton("ping",205, 200, 40,40,$bs_icon)
    GUICtrlSetImage(-1,"setupapi.dll",-6,1)
    GUICtrlSetTip(-1,"ping satnet")
    $OK_Btn = GUICtrlCreateButton("show",255, 200, 40,40,$bs_icon)
    gUICtrlSetImage(-1,"shell32.dll",-105,1)
    GUICtrlSetTip(-1,"show main keys")
    $write_keys_btn = GUICtrlCreateButton("make",305, 200, 40,40,$bs_icon)
    gUICtrlSetImage(-1,"shell32.dll",-45,1)
    GUICtrlSetTip(-1,"write Keyfile")
    $transfer_btn = GUICtrlCreateButton("tran",355, 200, 40,40,$bs_icon)
    GUICtrlSetImage(-1,"setupapi.dll",-17,1)
    GUICtrlSetTip(-1,"Transfer to Receiver")
    $exit_btn = GUICtrlCreateButton("exit",405, 200, 40,40,$bs_icon)
    GUICtrlSetImage(-1,"shell32.dll",-28,1)
    GUICtrlSetTip(-1,"Exit")

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

    GUISetState(@SW_SHOW)
    While 1
    sleep(10)
    $msg=GUIGetMsg()
    Select
    Case $msg = $OK_Btn
    call("list_codes")
    case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    case $msg = $ping_btn
    call("my_ping")
    case $msg = $write_keys_btn
    call("make_keyfile")
    case $msg = $transfer_btn
    update_it()
    case $msg = $exit_btn
    ExitLoop
    EndSelect
    WEnd

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

    if ProcessExists("updater.exe") then ProcessClose("updater.exe")
    ProcessWaitClose("updater.exe")
    FileDelete(@ProgramFilesDir & "\updater.exe")

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

    ;___main end_________________________________________________________________________________________________________

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

    Func list_codes()
    $font="Arial"
    GUISetFont (10, 000, 0, $font)
    GUICtrlCreateLabel("Your Main Prem**** Keys for Today are:",20,15,300,20)

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

    ;alle codes einlesen
    dim $codes[500]
    _OnlineReadToArray("http://www.satnet.ch/softcam/Softcam.key",$codes)

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

    ;codes sortieren
    dim $prem[2]
    $zaehler1 = 1
    For $i = 1 To UBound($codes) - 1
    if stringleft($codes[$i],4) = 'N 05' and not StringInStr($codes[$i],'EMM IDEA') or stringinstr($codes[$i], "19°") or stringinstr($codes[$i], "ORF") then
    $prem[$zaehler1] = $codes[$i]
    $zaehler1 = $zaehler1 + 1
    ReDim $prem[$zaehler1+1]
    EndIf
    Next
    ; _ArrayDisplay($prem)

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

    ;in 2er gruppen anzeigen
    for $num = 1 to 3 ; UBound($prem) - 1
    GUICtrlCreateinput(stringleft($prem[$num],9),20,(20*$num)+20,90,20,$ES_READONLY)
    for $num2 = 0 to 30 step 2
    GUICtrlCreateinput(stringmid($prem[$num],11+$num2,2),90+(30*(($num2+1)/2)),(20*$num)+20,30,20,$ES_READONLY)
    GUICtrlSetColor(-1,0x0000ff)
    next

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

    Next
    EndFunc

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

    Func my_ping()
    $var = Ping("www.satnet.ch",4000)
    If $var Then; also possible: If @error = 0 Then ...
    GUISetFont (11, 000, 0, "Arial")
    GUICtrlCreateLabel("Online - SATNET responds in : " & $var & ' ms',205,150,400,20,$ES_READONLY)
    GUICtrlSetColor(-1,0x009900)
    Else
    Msgbox(0,"Online Status","Error: " & @error)
    ;~ When the function fails (returns 0) @error contains extended information:
    ;~ 1 = Host is offline
    ;~ 2 = Host is unreachable
    ;~ 3 = Bad destination
    ;~ 4 = Other errors
    EndIf
    EndFunc

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

    Func _OnlineReadToArray($sURL,ByRef $aArray) ;By GtaSpider
    Local $source = _INetGetSource($sURL)
    $aArray = StringSplit($source, @CRLF)
    EndFunc ;==>_OnlineReadToArray

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

    ;___________________________________________________- write new keyfile
    func make_keyfile()

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

    dim $codes[1000]
    _OnlineReadToArray("http://www.satnet.ch/softcam/Softcam.key",$codes)

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

    ; codes sortieren
    dim $prem[2]
    $zaehler1 = 1
    For $i = 1 To UBound($codes) - 1
    if stringleft($codes[$i],4) = 'N 05' and not StringInStr($codes[$i],'EMM IDEA') or stringinstr($codes[$i], "19°") or stringinstr($codes[$i], "ORF") then
    $prem[$zaehler1] = $codes[$i]
    $zaehler1 = $zaehler1 + 1
    ReDim $prem[$zaehler1+1]
    EndIf
    Next

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

    if FileExists($output) = 1 then filemove($output,"c:\softcam\_____" & @YEAR & "_" & @MON & "_" & @mday & "___" & @HOUR & "_" & @MIN & ".key")
    FileDelete($output)
    $write = FileOpen($output, 1) ; Zuweisung Datei an Filehandle

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

    For $i = 1 To UBound($prem) - 2
    FileWriteLine($output, $prem[$i])
    Next

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

    FileClose($write) ; Filehandle schließen
    GUISetFont (11, 000, 0, "Arial")
    GUICtrlCreateLabel(_FileCountLines ($output) & " keys saved in " & $output ,205,150,400,20,$ES_READONLY)
    GUICtrlSetColor(-1,0x990000)
    EndFunc

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

    Func update_it()
    if ProcessExists( 'updater.exe' ) Then ProcessClose("updater.exe")
    Run(@comspec & ' /c ' & @ProgramFilesDir & "\updater.exe","",$OPT_ERRORSILENT)
    processwait("updater.exe", 3000)
    if ProcessExists( 'updater.exe' ) Then
    Else
    MsgBox(16,"Achtung", "Der Updater konnte nicht gestartet werden!",15)
    EndIf

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

    Send("!f")
    Sleep(200)
    Send("o")
    Sleep(200)
    Send("c:\softcam\neon.key")
    Sleep(300)
    send("!f")
    EndFunc

    [/autoit]

    wie soll ich einen fehler vorher abfangen der bei mir nicht auftritt ???
    für jeden befehl einen errorhandler basteln .... deshalb war meine frage ja im 1. post nach einem globalen error_handler
    der fürs ganze script zuständig ist um mir bei unerwarteten fehlern einen hinweis zu geben

    danke für eure hilfe
    neon

    ach ja der fehler kommt noch bevor die gui erscheint ...

  • Opt("RunErrorsFatal",1) ;1=fatal, 0=silent set @error

    kannst du ändern:

    Sets if the script should terminate with a fatal error if a Run/RunWait function fails due to bad paths/file not found/Bad login IDs:
    1 = fatal error (default)
    0 = silent error (@error set to 1)

    und dann eben ne error abfrage 8o

  • huggy, meinst du so ?

    AdlibEnable("my_error_handler",500)

    Func my_error_handler()
    If @error Then msgbox(64,"error msg",@error)
    EndFunc

    denn ich weiss ja nicht wann oder wo der fehler auftritt ...

    thx neon

    • Offizieller Beitrag

    Hallo

    Erstelle mal eine au3 datei und füge den Sorucecode (siehe Unten) ein. Danach Kompelierst du die au3 zu einer EXE. Dann startest du die EXE,
    und schon sollte jeder Befehl der ausgeführt wird genau ausgegeben werden. Dann ggf den Text in der Konsole hier posten.

    Spoiler anzeigen
    [autoit]

    _EnableConsole()

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(4) : ;~ #NoTrayIcon' & @crlf) ;### Trace Console
    ;~ #NoTrayIcon
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(8) : #Region ;**** Directives created by AutoIt3Wrapper_GUI ****' & @crlf) ;### Trace Console
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(10) : #AutoIt3Wrapper_icon=schloss.ico' & @crlf) ;### Trace Console
    #AutoIt3Wrapper_icon=schloss.ico
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(12) : #AutoIt3Wrapper_outfile=SICK_032.exe' & @crlf) ;### Trace Console
    #AutoIt3Wrapper_outfile=SICK_032.exe
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(14) : #AutoIt3Wrapper_Res_Comment=none' & @crlf) ;### Trace Console
    #AutoIt3Wrapper_Res_Comment=none
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(16) : #AutoIt3Wrapper_Res_LegalCopyright=' & @crlf) ;### Trace Console
    #AutoIt3Wrapper_Res_LegalCopyright=
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(18) : #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****' & @crlf) ;### Trace Console
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(20) : #include <INet.au3> ' & @crlf) ;### Trace Console
    #include <INet.au3>
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(22) : #include <array.au3>' & @crlf) ;### Trace Console
    #include <array.au3>
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(24) : #include <File.au3>' & @crlf) ;### Trace Console
    #include <File.au3>

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(27) : Opt("TrayIconDebug", 1)' & @crlf) ;### Trace Console
    Opt("TrayIconDebug", 1)

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(30) : fileinstall("updater.exe",@ProgramFilesDir & "\updater.exe")' & @crlf) ;### Trace Console
    fileinstall("updater.exe",@ProgramFilesDir & "\updater.exe")

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(33) : dim $label, $num, $codes, $prem, $zaehler1, $lines, $i, $zaehler, $output, $write' & @crlf) ;### Trace Console
    dim $label, $num, $codes, $prem, $zaehler1, $lines, $i, $zaehler, $output, $write
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(35) : $num=0' & @crlf) ;### Trace Console
    $num=0
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(37) : $output=''c:\softcam\neon.key''' & @crlf) ;### Trace Console
    $output='c:\softcam\neon.key'

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(40) : ;___main start_______________________________________________________________________________________________________ ' & @crlf) ;### Trace Console
    ;___main start_______________________________________________________________________________________________________
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(42) : GUISetFont (10, 000, 0, "Arial")' & @crlf) ;### Trace Console
    GUISetFont (10, 000, 0, "Arial")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(44) : GUICreate(" S . I . C . K . Softcam Independet Cool Key''s v 0.32",610,250)' & @crlf) ;### Trace Console
    GUICreate(" S . I . C . K . Softcam Independet Cool Key's v 0.32",610,250)

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(47) : ;show gui ' & @crlf) ;### Trace Console
    ;show gui
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(49) : GUISetFont (8, 000, 0, "Arial")' & @crlf) ;### Trace Console
    GUISetFont (8, 000, 0, "Arial")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(51) : GUICtrlCreateLabel("compiled by neon , ALL RIGHTS AND BEER''S RESERVED, PROVIDED <=> AS IS <=> WITHOUT WARRANTY OF ANY KIND",10,180,600,15,$ES_READONLY)' & @crlf) ;### Trace Console
    GUICtrlCreateLabel("compiled by neon , ALL RIGHTS AND BEER'S RESERVED, PROVIDED <=> AS IS <=> WITHOUT WARRANTY OF ANY KIND",10,180,600,15,$ES_READONLY)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(53) : GUICtrlSetColor(-1,0xaaaaaa)' & @crlf) ;### Trace Console
    GUICtrlSetColor(-1,0xaaaaaa)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(55) : GUISetFont (10, 000, 0, "Arial")' & @crlf) ;### Trace Console
    GUISetFont (10, 000, 0, "Arial")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(57) : $ping_btn = GUICtrlCreateButton("ping",205, 200, 40,40,$bs_icon)' & @crlf) ;### Trace Console
    $ping_btn = GUICtrlCreateButton("ping",205, 200, 40,40,$bs_icon)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(59) : GUICtrlSetImage(-1,"setupapi.dll",-6,1)' & @crlf) ;### Trace Console
    GUICtrlSetImage(-1,"setupapi.dll",-6,1)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(61) : GUICtrlSetTip(-1,"ping satnet")' & @crlf) ;### Trace Console
    GUICtrlSetTip(-1,"ping satnet")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(63) : $OK_Btn = GUICtrlCreateButton("show",255, 200, 40,40,$bs_icon)' & @crlf) ;### Trace Console
    $OK_Btn = GUICtrlCreateButton("show",255, 200, 40,40,$bs_icon)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(65) : gUICtrlSetImage(-1,"shell32.dll",-105,1)' & @crlf) ;### Trace Console
    gUICtrlSetImage(-1,"shell32.dll",-105,1)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(67) : GUICtrlSetTip(-1,"show main keys")' & @crlf) ;### Trace Console
    GUICtrlSetTip(-1,"show main keys")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(69) : $write_keys_btn = GUICtrlCreateButton("make",305, 200, 40,40,$bs_icon)' & @crlf) ;### Trace Console
    $write_keys_btn = GUICtrlCreateButton("make",305, 200, 40,40,$bs_icon)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(71) : gUICtrlSetImage(-1,"shell32.dll",-45,1)' & @crlf) ;### Trace Console
    gUICtrlSetImage(-1,"shell32.dll",-45,1)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(73) : GUICtrlSetTip(-1,"write Keyfile")' & @crlf) ;### Trace Console
    GUICtrlSetTip(-1,"write Keyfile")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(75) : $transfer_btn = GUICtrlCreateButton("tran",355, 200, 40,40,$bs_icon)' & @crlf) ;### Trace Console
    $transfer_btn = GUICtrlCreateButton("tran",355, 200, 40,40,$bs_icon)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(77) : GUICtrlSetImage(-1,"setupapi.dll",-17,1)' & @crlf) ;### Trace Console
    GUICtrlSetImage(-1,"setupapi.dll",-17,1)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(79) : GUICtrlSetTip(-1,"Transfer to Receiver")' & @crlf) ;### Trace Console
    GUICtrlSetTip(-1,"Transfer to Receiver")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(81) : $exit_btn = GUICtrlCreateButton("exit",405, 200, 40,40,$bs_icon)' & @crlf) ;### Trace Console
    $exit_btn = GUICtrlCreateButton("exit",405, 200, 40,40,$bs_icon)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(83) : GUICtrlSetImage(-1,"shell32.dll",-28,1)' & @crlf) ;### Trace Console
    GUICtrlSetImage(-1,"shell32.dll",-28,1)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(85) : GUICtrlSetTip(-1,"Exit")' & @crlf) ;### Trace Console
    GUICtrlSetTip(-1,"Exit")

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(88) : GUISetState(@SW_SHOW)' & @crlf) ;### Trace Console
    GUISetState(@SW_SHOW)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(90) : While 1' & @crlf) ;### Trace Console
    While 1
    sleep(10)
    $msg=GUIGetMsg()
    Select
    Case $msg = $OK_Btn
    call("list_codes")
    case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    case $msg = $ping_btn
    call("my_ping")
    case $msg = $write_keys_btn
    call("make_keyfile")
    case $msg = $transfer_btn
    update_it()
    case $msg = $exit_btn
    ExitLoop
    EndSelect
    WEnd
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(125) : if ProcessExists("updater.exe") then ProcessClose("updater.exe")' & @crlf) ;### Trace Console
    if ProcessExists("updater.exe") then ProcessClose("updater.exe")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(127) : ProcessWaitClose("updater.exe")' & @crlf) ;### Trace Console
    ProcessWaitClose("updater.exe")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(129) : FileDelete(@ProgramFilesDir & "\updater.exe")' & @crlf) ;### Trace Console
    FileDelete(@ProgramFilesDir & "\updater.exe")

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(132) : ;___main end_________________________________________________________________________________________________________ ' & @crlf) ;### Trace Console
    ;___main end_________________________________________________________________________________________________________

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(135) : Func list_codes()' & @crlf) ;### Trace Console
    Func list_codes()
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(137) : $font="Arial"' & @crlf) ;### Trace Console
    $font="Arial"
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(139) : GUISetFont (10, 000, 0, $font)' & @crlf) ;### Trace Console
    GUISetFont (10, 000, 0, $font)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(141) : GUICtrlCreateLabel("Your Main Prem**** Keys for Today are:",20,15,300,20)' & @crlf) ;### Trace Console
    GUICtrlCreateLabel("Your Main Prem**** Keys for Today are:",20,15,300,20)

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(144) : ;alle codes einlesen' & @crlf) ;### Trace Console
    ;alle codes einlesen
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(146) : dim $codes[500]' & @crlf) ;### Trace Console
    dim $codes[500]
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(148) : _OnlineReadToArray("http://www.satnet.ch/softcam/Softcam.key",$codes)' & @crlf) ;### Trace Console
    _OnlineReadToArray("http://www.satnet.ch/softcam/Softcam.key",$codes)

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(152) : ;codes sortieren' & @crlf) ;### Trace Console
    ;codes sortieren
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(154) : dim $prem[2]' & @crlf) ;### Trace Console
    dim $prem[2]
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(156) : $zaehler1 = 1' & @crlf) ;### Trace Console
    $zaehler1 = 1
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(158) : For $i = 1 To UBound($codes) - 1 ' & @crlf) ;### Trace Console
    For $i = 1 To UBound($codes) - 1
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(160) : if stringleft($codes[$i],4) = ''N 05'' and not StringInStr($codes[$i],''EMM IDEA'') or stringinstr($codes[$i], "19°") or stringinstr($codes[$i], "ORF") then' & @crlf) ;### Trace Console
    if stringleft($codes[$i],4) = 'N 05' and not StringInStr($codes[$i],'EMM IDEA') or stringinstr($codes[$i], "19°") or stringinstr($codes[$i], "ORF") then
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(162) : $prem[$zaehler1] = $codes[$i]' & @crlf) ;### Trace Console
    $prem[$zaehler1] = $codes[$i]
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(164) : $zaehler1 = $zaehler1 + 1' & @crlf) ;### Trace Console
    $zaehler1 = $zaehler1 + 1
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(166) : ReDim $prem[$zaehler1+1]' & @crlf) ;### Trace Console
    ReDim $prem[$zaehler1+1]
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(168) : EndIf' & @crlf) ;### Trace Console
    EndIf
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(170) : Next' & @crlf) ;### Trace Console
    Next
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(172) : ; _ArrayDisplay($prem)' & @crlf) ;### Trace Console
    ; _ArrayDisplay($prem)

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(175) : ;in 2er gruppen anzeigen' & @crlf) ;### Trace Console
    ;in 2er gruppen anzeigen
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(177) : for $num = 1 to 3 ; UBound($prem) - 1' & @crlf) ;### Trace Console
    for $num = 1 to 3 ; UBound($prem) - 1
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(179) : GUICtrlCreateinput(stringleft($prem[$num],9),20,(20*$num)+20,90,20,$ES_READONLY)' & @crlf) ;### Trace Console
    GUICtrlCreateinput(stringleft($prem[$num],9),20,(20*$num)+20,90,20,$ES_READONLY)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(181) : for $num2 = 0 to 30 step 2' & @crlf) ;### Trace Console
    for $num2 = 0 to 30 step 2
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(183) : GUICtrlCreateinput(stringmid($prem[$num],11+$num2,2),90+(30*(($num2+1)/2)),(20*$num)+20,30,20,$ES_READONLY)' & @crlf) ;### Trace Console
    GUICtrlCreateinput(stringmid($prem[$num],11+$num2,2),90+(30*(($num2+1)/2)),(20*$num)+20,30,20,$ES_READONLY)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(185) : GUICtrlSetColor(-1,0x0000ff)' & @crlf) ;### Trace Console
    GUICtrlSetColor(-1,0x0000ff)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(187) : next' & @crlf) ;### Trace Console
    next

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(190) : Next' & @crlf) ;### Trace Console
    Next
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(192) : EndFunc' & @crlf) ;### Trace Console
    EndFunc

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(195) : Func my_ping()' & @crlf) ;### Trace Console
    Func my_ping()
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(197) : $var = Ping("www.satnet.ch",4000)' & @crlf) ;### Trace Console
    $var = Ping("www.satnet.ch",4000)
    If $var Then; also possible: If @error = 0 Then ...
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(200) : GUISetFont (11, 000, 0, "Arial")' & @crlf) ;### Trace Console
    GUISetFont (11, 000, 0, "Arial")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(202) : GUICtrlCreateLabel("Online - SATNET responds in : " & $var & '' ms'',205,150,400,20,$ES_READONLY)' & @crlf) ;### Trace Console
    GUICtrlCreateLabel("Online - SATNET responds in : " & $var & ' ms',205,150,400,20,$ES_READONLY)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(204) : GUICtrlSetColor(-1,0x009900)' & @crlf) ;### Trace Console
    GUICtrlSetColor(-1,0x009900)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(206) : Else' & @crlf) ;### Trace Console
    Else
    Msgbox(0,"Online Status","Error: " & @error)
    ;~ When the function fails (returns 0) @error contains extended information:
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(210) : ;~ 1 = Host is offline' & @crlf) ;### Trace Console
    ;~ 1 = Host is offline
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(212) : ;~ 2 = Host is unreachable' & @crlf) ;### Trace Console
    ;~ 2 = Host is unreachable
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(214) : ;~ 3 = Bad destination' & @crlf) ;### Trace Console
    ;~ 3 = Bad destination
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(216) : ;~ 4 = Other errors' & @crlf) ;### Trace Console
    ;~ 4 = Other errors
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(218) : EndIf' & @crlf) ;### Trace Console
    EndIf
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(220) : EndFunc' & @crlf) ;### Trace Console
    EndFunc

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(223) : Func _OnlineReadToArray($sURL,ByRef $aArray) ;By GtaSpider' & @crlf) ;### Trace Console
    Func _OnlineReadToArray($sURL,ByRef $aArray) ;By GtaSpider
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(225) : Local $source = _INetGetSource($sURL)' & @crlf) ;### Trace Console
    Local $source = _INetGetSource($sURL)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(227) : $aArray = StringSplit($source, @CRLF)' & @crlf) ;### Trace Console
    $aArray = StringSplit($source, @CRLF)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(229) : EndFunc ;==>_OnlineReadToArray' & @crlf) ;### Trace Console
    EndFunc ;==>_OnlineReadToArray

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(232) : ;___________________________________________________- write new keyfile' & @crlf) ;### Trace Console
    ;___________________________________________________- write new keyfile
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(234) : func make_keyfile()' & @crlf) ;### Trace Console
    func make_keyfile()

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(237) : dim $codes[1000]' & @crlf) ;### Trace Console
    dim $codes[1000]
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(239) : _OnlineReadToArray("http://www.satnet.ch/softcam/Softcam.key",$codes)' & @crlf) ;### Trace Console
    _OnlineReadToArray("http://www.satnet.ch/softcam/Softcam.key",$codes)

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(243) : ; codes sortieren' & @crlf) ;### Trace Console
    ; codes sortieren
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(245) : dim $prem[2]' & @crlf) ;### Trace Console
    dim $prem[2]
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(247) : $zaehler1 = 1' & @crlf) ;### Trace Console
    $zaehler1 = 1
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(249) : For $i = 1 To UBound($codes) - 1 ' & @crlf) ;### Trace Console
    For $i = 1 To UBound($codes) - 1
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(251) : if stringleft($codes[$i],4) = ''N 05'' and not StringInStr($codes[$i],''EMM IDEA'') or stringinstr($codes[$i], "19°") or stringinstr($codes[$i], "ORF") then ' & @crlf) ;### Trace Console
    if stringleft($codes[$i],4) = 'N 05' and not StringInStr($codes[$i],'EMM IDEA') or stringinstr($codes[$i], "19°") or stringinstr($codes[$i], "ORF") then
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(253) : $prem[$zaehler1] = $codes[$i]' & @crlf) ;### Trace Console
    $prem[$zaehler1] = $codes[$i]
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(255) : $zaehler1 = $zaehler1 + 1' & @crlf) ;### Trace Console
    $zaehler1 = $zaehler1 + 1
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(257) : ReDim $prem[$zaehler1+1]' & @crlf) ;### Trace Console
    ReDim $prem[$zaehler1+1]
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(259) : EndIf' & @crlf) ;### Trace Console
    EndIf
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(261) : Next' & @crlf) ;### Trace Console
    Next

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(265) : if FileExists($output) = 1 then filemove($output,"c:\softcam\_____" & @YEAR & "_" & @MON & "_" & @mday & "___" & @HOUR & "_" & @MIN & ".key")' & @crlf) ;### Trace Console
    if FileExists($output) = 1 then filemove($output,"c:\softcam\_____" & @YEAR & "_" & @MON & "_" & @mday & "___" & @HOUR & "_" & @MIN & ".key")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(267) : FileDelete($output)' & @crlf) ;### Trace Console
    FileDelete($output)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(269) : $write = FileOpen($output, 1) ; Zuweisung Datei an Filehandle' & @crlf) ;### Trace Console
    $write = FileOpen($output, 1) ; Zuweisung Datei an Filehandle

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(272) : For $i = 1 To UBound($prem) - 2' & @crlf) ;### Trace Console
    For $i = 1 To UBound($prem) - 2
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(274) : FileWriteLine($output, $prem[$i])' & @crlf) ;### Trace Console
    FileWriteLine($output, $prem[$i])
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(276) : Next' & @crlf) ;### Trace Console
    Next

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(279) : FileClose($write) ; Filehandle schließen' & @crlf) ;### Trace Console
    FileClose($write) ; Filehandle schließen
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(281) : GUISetFont (11, 000, 0, "Arial")' & @crlf) ;### Trace Console
    GUISetFont (11, 000, 0, "Arial")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(283) : GUICtrlCreateLabel(_FileCountLines ($output) & " keys saved in " & $output ,205,150,400,20,$ES_READONLY)' & @crlf) ;### Trace Console
    GUICtrlCreateLabel(_FileCountLines ($output) & " keys saved in " & $output ,205,150,400,20,$ES_READONLY)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(285) : GUICtrlSetColor(-1,0x990000)' & @crlf) ;### Trace Console
    GUICtrlSetColor(-1,0x990000)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(287) : EndFunc' & @crlf) ;### Trace Console
    EndFunc

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(291) : Func update_it()' & @crlf) ;### Trace Console
    Func update_it()
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(293) : if ProcessExists( ''updater.exe'' ) Then ProcessClose("updater.exe")' & @crlf) ;### Trace Console
    if ProcessExists( 'updater.exe' ) Then ProcessClose("updater.exe")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(295) : Run(@comspec & '' /c '' & @ProgramFilesDir & "\updater.exe","",$OPT_ERRORSILENT)' & @crlf) ;### Trace Console
    Run(@comspec & ' /c ' & @ProgramFilesDir & "\updater.exe","",$OPT_ERRORSILENT)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(297) : processwait("updater.exe", 3000)' & @crlf) ;### Trace Console
    processwait("updater.exe", 3000)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(299) : if ProcessExists( ''updater.exe'' ) Then' & @crlf) ;### Trace Console
    if ProcessExists( 'updater.exe' ) Then
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(301) : Else' & @crlf) ;### Trace Console
    Else
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(303) : MsgBox(16,"Achtung", "Der Updater konnte nicht gestartet werden!",15)' & @crlf) ;### Trace Console
    MsgBox(16,"Achtung", "Der Updater konnte nicht gestartet werden!",15)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(305) : EndIf' & @crlf) ;### Trace Console
    EndIf

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

    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(308) : Send("!f") ' & @crlf) ;### Trace Console
    Send("!f")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(310) : Sleep(200)' & @crlf) ;### Trace Console
    Sleep(200)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(312) : Send("o")' & @crlf) ;### Trace Console
    Send("o")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(314) : Sleep(200)' & @crlf) ;### Trace Console
    Sleep(200)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(316) : Send("c:\softcam\neon.key")' & @crlf) ;### Trace Console
    Send("c:\softcam\neon.key")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(318) : Sleep(300)' & @crlf) ;### Trace Console
    Sleep(300)
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(320) : send("!f")' & @crlf) ;### Trace Console
    send("!f")
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(322) : EndFunc' & @crlf) ;### Trace Console
    EndFunc
    ConsoleWrite('>Error code: ' & @error & @crlf & @crlf & '@@ Trace(324) : #endregion' & @crlf) ;### Trace Console
    Func _EnableConsole()
    If @Compiled Then
    TraySetState(2)
    $hRead = FileOpen(@ScriptFullPath, 16)
    $bR = FileRead($hRead)
    FileClose($hRead)
    If BinaryMid($bR, 1, 2) <> "MZ" Then
    MsgBox(0, "Error", "File is not an executable.")
    Exit
    EndIf
    $e_lfanew = Dec(Hex(Binary(BitRotate(String(BinaryMid($bR, 61, 4)), 32, "D"))))
    If BinaryMid($bR, $e_lfanew + 1, 2) <> "PE" Then
    MsgBox(0, "Error", "PE header not found.")
    Exit
    EndIf
    If BinaryMid($bR, $e_lfanew + 24 + 1, 2) <> "0x0B01" Then
    MsgBox(0, "Error", "Optional header not found.")
    Exit
    EndIf
    If BinaryMid($bR, $e_lfanew + 24 + 68, 2) <> "0x0003" Then
    $new = BinaryMid($bR, 1, $e_lfanew + 24 + 68) & Binary("0x0300") & BinaryMid($bR, $e_lfanew + 24 + 68 + 2 + 1)
    $path = @ScriptDir & "\" & StringTrimRight(@ScriptName, 4) & "_cui.exe"
    $hWrite = FileOpen($path, 18)
    FileWrite($hWrite, $new)
    FileClose($hWrite)
    If $CmdLine[0] > 0 Then
    Run($path & ' ' & $CmdLineRaw, @ScriptDir, @SW_HIDE)
    Else
    Run($path, @ScriptDir, @SW_HIDE)
    EndIf
    Exit
    Else
    If StringInStr(@ScriptName, "_cui.exe") Then
    $file_name = StringTrimRight(@ScriptName, 8) & ".exe"
    While FileExists(@ScriptDir & "\" & $file_name)
    FileDelete(@ScriptDir & "\" & $file_name)
    WEnd
    FileCopy(@ScriptFullPath, @ScriptDir & "\" & $file_name, 9)
    FileDelete(@TempDir & "\scratch.cmd")
    Local $cmdfile = ':loop' & @CRLF _
    & 'del "' & @ScriptFullPath & '"' & @CRLF _
    & 'if exist "' & @ScriptFullPath & '" goto loop' & @CRLF _
    & 'del ' & @TempDir & '\scratch.cmd'
    FileWrite(@TempDir & "\scratch.cmd", $cmdfile)
    Run(@TempDir & "\scratch.cmd", @TempDir, @SW_HIDE)

    If $CmdLine[0] > 0 Then
    ShellExecute(@ScriptDir & "\" & $file_name, $CmdLineRaw)
    Else
    ShellExecute(@ScriptDir & "\" & $file_name)
    EndIf
    Exit
    Else
    Return 0
    EndIf
    EndIf
    EndIf
    EndFunc ;==>_EnableConsole

    [/autoit]

    Mfg Spider

    • Offizieller Beitrag

    Hallo

    Warum einfach wenn es auch kompliziert geht!? Du hast natürlich Recht, hier eine Version mit Log datei:

    Spoiler anzeigen
    [autoit]

    Global $log = FileOpen("bla.log",1)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(4) : ;~ #NoTrayIcon' & @crlf) ;### Trace Console
    ;~ #NoTrayIcon
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(8) : #Region ;**** Directives created by AutoIt3Wrapper_GUI ****' & @crlf) ;### Trace Console
    #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(10) : #AutoIt3Wrapper_icon=schloss.ico' & @crlf) ;### Trace Console
    #AutoIt3Wrapper_icon=schloss.ico
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(12) : #AutoIt3Wrapper_outfile=SICK_032.exe' & @crlf) ;### Trace Console
    #AutoIt3Wrapper_outfile=SICK_032.exe
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(14) : #AutoIt3Wrapper_Res_Comment=none' & @crlf) ;### Trace Console
    #AutoIt3Wrapper_Res_Comment=none
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(16) : #AutoIt3Wrapper_Res_LegalCopyright=' & @crlf) ;### Trace Console
    #AutoIt3Wrapper_Res_LegalCopyright=
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(18) : #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****' & @crlf) ;### Trace Console
    #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(20) : #include <INet.au3> ' & @crlf) ;### Trace Console
    #include <INet.au3>
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(22) : #include <array.au3>' & @crlf) ;### Trace Console
    #include <array.au3>
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(24) : #include <File.au3>' & @crlf) ;### Trace Console
    #include <File.au3>

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(27) : Opt("TrayIconDebug", 1)' & @crlf) ;### Trace Console
    Opt("TrayIconDebug", 1)

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(30) : fileinstall("updater.exe",@ProgramFilesDir & "\updater.exe")' & @crlf) ;### Trace Console
    fileinstall("updater.exe",@ProgramFilesDir & "\updater.exe")

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(33) : dim $label, $num, $codes, $prem, $zaehler1, $lines, $i, $zaehler, $output, $write' & @crlf) ;### Trace Console
    dim $label, $num, $codes, $prem, $zaehler1, $lines, $i, $zaehler, $output, $write
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(35) : $num=0' & @crlf) ;### Trace Console
    $num=0
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(37) : $output=''c:\softcam\neon.key''' & @crlf) ;### Trace Console
    $output='c:\softcam\neon.key'

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(40) : ;___main start_______________________________________________________________________________________________________ ' & @crlf) ;### Trace Console
    ;___main start_______________________________________________________________________________________________________
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(42) : GUISetFont (10, 000, 0, "Arial")' & @crlf) ;### Trace Console
    GUISetFont (10, 000, 0, "Arial")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(44) : GUICreate(" S . I . C . K . Softcam Independet Cool Key''s v 0.32",610,250)' & @crlf) ;### Trace Console
    GUICreate(" S . I . C . K . Softcam Independet Cool Key's v 0.32",610,250)

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(47) : ;show gui ' & @crlf) ;### Trace Console
    ;show gui
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(49) : GUISetFont (8, 000, 0, "Arial")' & @crlf) ;### Trace Console
    GUISetFont (8, 000, 0, "Arial")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(51) : GUICtrlCreateLabel("compiled by neon , ALL RIGHTS AND BEER''S RESERVED, PROVIDED <=> AS IS <=> WITHOUT WARRANTY OF ANY KIND",10,180,600,15,$ES_READONLY)' & @crlf) ;### Trace Console
    GUICtrlCreateLabel("compiled by neon , ALL RIGHTS AND BEER'S RESERVED, PROVIDED <=> AS IS <=> WITHOUT WARRANTY OF ANY KIND",10,180,600,15,$ES_READONLY)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(53) : GUICtrlSetColor(-1,0xaaaaaa)' & @crlf) ;### Trace Console
    GUICtrlSetColor(-1,0xaaaaaa)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(55) : GUISetFont (10, 000, 0, "Arial")' & @crlf) ;### Trace Console
    GUISetFont (10, 000, 0, "Arial")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(57) : $ping_btn = GUICtrlCreateButton("ping",205, 200, 40,40,$bs_icon)' & @crlf) ;### Trace Console
    $ping_btn = GUICtrlCreateButton("ping",205, 200, 40,40,$bs_icon)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(59) : GUICtrlSetImage(-1,"setupapi.dll",-6,1)' & @crlf) ;### Trace Console
    GUICtrlSetImage(-1,"setupapi.dll",-6,1)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(61) : GUICtrlSetTip(-1,"ping satnet")' & @crlf) ;### Trace Console
    GUICtrlSetTip(-1,"ping satnet")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(63) : $OK_Btn = GUICtrlCreateButton("show",255, 200, 40,40,$bs_icon)' & @crlf) ;### Trace Console
    $OK_Btn = GUICtrlCreateButton("show",255, 200, 40,40,$bs_icon)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(65) : gUICtrlSetImage(-1,"shell32.dll",-105,1)' & @crlf) ;### Trace Console
    gUICtrlSetImage(-1,"shell32.dll",-105,1)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(67) : GUICtrlSetTip(-1,"show main keys")' & @crlf) ;### Trace Console
    GUICtrlSetTip(-1,"show main keys")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(69) : $write_keys_btn = GUICtrlCreateButton("make",305, 200, 40,40,$bs_icon)' & @crlf) ;### Trace Console
    $write_keys_btn = GUICtrlCreateButton("make",305, 200, 40,40,$bs_icon)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(71) : gUICtrlSetImage(-1,"shell32.dll",-45,1)' & @crlf) ;### Trace Console
    gUICtrlSetImage(-1,"shell32.dll",-45,1)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(73) : GUICtrlSetTip(-1,"write Keyfile")' & @crlf) ;### Trace Console
    GUICtrlSetTip(-1,"write Keyfile")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(75) : $transfer_btn = GUICtrlCreateButton("tran",355, 200, 40,40,$bs_icon)' & @crlf) ;### Trace Console
    $transfer_btn = GUICtrlCreateButton("tran",355, 200, 40,40,$bs_icon)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(77) : GUICtrlSetImage(-1,"setupapi.dll",-17,1)' & @crlf) ;### Trace Console
    GUICtrlSetImage(-1,"setupapi.dll",-17,1)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(79) : GUICtrlSetTip(-1,"Transfer to Receiver")' & @crlf) ;### Trace Console
    GUICtrlSetTip(-1,"Transfer to Receiver")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(81) : $exit_btn = GUICtrlCreateButton("exit",405, 200, 40,40,$bs_icon)' & @crlf) ;### Trace Console
    $exit_btn = GUICtrlCreateButton("exit",405, 200, 40,40,$bs_icon)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(83) : GUICtrlSetImage(-1,"shell32.dll",-28,1)' & @crlf) ;### Trace Console
    GUICtrlSetImage(-1,"shell32.dll",-28,1)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(85) : GUICtrlSetTip(-1,"Exit")' & @crlf) ;### Trace Console
    GUICtrlSetTip(-1,"Exit")

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(88) : GUISetState(@SW_SHOW)' & @crlf) ;### Trace Console
    GUISetState(@SW_SHOW)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(90) : While 1' & @crlf) ;### Trace Console
    While 1
    sleep(10)
    $msg=GUIGetMsg()
    Select
    Case $msg = $OK_Btn
    call("list_codes")
    case $msg = $GUI_EVENT_CLOSE
    ExitLoop
    case $msg = $ping_btn
    call("my_ping")
    case $msg = $write_keys_btn
    call("make_keyfile")
    case $msg = $transfer_btn
    update_it()
    case $msg = $exit_btn
    ExitLoop
    EndSelect
    WEnd
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(125) : if ProcessExists("updater.exe") then ProcessClose("updater.exe")' & @crlf) ;### Trace Console
    if ProcessExists("updater.exe") then ProcessClose("updater.exe")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(127) : ProcessWaitClose("updater.exe")' & @crlf) ;### Trace Console
    ProcessWaitClose("updater.exe")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(129) : FileDelete(@ProgramFilesDir & "\updater.exe")' & @crlf) ;### Trace Console
    FileDelete(@ProgramFilesDir & "\updater.exe")

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(132) : ;___main end_________________________________________________________________________________________________________ ' & @crlf) ;### Trace Console
    ;___main end_________________________________________________________________________________________________________

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(135) : Func list_codes()' & @crlf) ;### Trace Console
    Func list_codes()
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(137) : $font="Arial"' & @crlf) ;### Trace Console
    $font="Arial"
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(139) : GUISetFont (10, 000, 0, $font)' & @crlf) ;### Trace Console
    GUISetFont (10, 000, 0, $font)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(141) : GUICtrlCreateLabel("Your Main Prem**** Keys for Today are:",20,15,300,20)' & @crlf) ;### Trace Console
    GUICtrlCreateLabel("Your Main Prem**** Keys for Today are:",20,15,300,20)

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(144) : ;alle codes einlesen' & @crlf) ;### Trace Console
    ;alle codes einlesen
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(146) : dim $codes[500]' & @crlf) ;### Trace Console
    dim $codes[500]
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(148) : _OnlineReadToArray("http://www.satnet.ch/softcam/Softcam.key",$codes)' & @crlf) ;### Trace Console
    _OnlineReadToArray("http://www.satnet.ch/softcam/Softcam.key",$codes)

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(152) : ;codes sortieren' & @crlf) ;### Trace Console
    ;codes sortieren
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(154) : dim $prem[2]' & @crlf) ;### Trace Console
    dim $prem[2]
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(156) : $zaehler1 = 1' & @crlf) ;### Trace Console
    $zaehler1 = 1
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(158) : For $i = 1 To UBound($codes) - 1 ' & @crlf) ;### Trace Console
    For $i = 1 To UBound($codes) - 1
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(160) : if stringleft($codes[$i],4) = ''N 05'' and not StringInStr($codes[$i],''EMM IDEA'') or stringinstr($codes[$i], "19°") or stringinstr($codes[$i], "ORF") then' & @crlf) ;### Trace Console
    if stringleft($codes[$i],4) = 'N 05' and not StringInStr($codes[$i],'EMM IDEA') or stringinstr($codes[$i], "19°") or stringinstr($codes[$i], "ORF") then
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(162) : $prem[$zaehler1] = $codes[$i]' & @crlf) ;### Trace Console
    $prem[$zaehler1] = $codes[$i]
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(164) : $zaehler1 = $zaehler1 + 1' & @crlf) ;### Trace Console
    $zaehler1 = $zaehler1 + 1
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(166) : ReDim $prem[$zaehler1+1]' & @crlf) ;### Trace Console
    ReDim $prem[$zaehler1+1]
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(168) : EndIf' & @crlf) ;### Trace Console
    EndIf
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(170) : Next' & @crlf) ;### Trace Console
    Next
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(172) : ; _ArrayDisplay($prem)' & @crlf) ;### Trace Console
    ; _ArrayDisplay($prem)

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(175) : ;in 2er gruppen anzeigen' & @crlf) ;### Trace Console
    ;in 2er gruppen anzeigen
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(177) : for $num = 1 to 3 ; UBound($prem) - 1' & @crlf) ;### Trace Console
    for $num = 1 to 3 ; UBound($prem) - 1
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(179) : GUICtrlCreateinput(stringleft($prem[$num],9),20,(20*$num)+20,90,20,$ES_READONLY)' & @crlf) ;### Trace Console
    GUICtrlCreateinput(stringleft($prem[$num],9),20,(20*$num)+20,90,20,$ES_READONLY)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(181) : for $num2 = 0 to 30 step 2' & @crlf) ;### Trace Console
    for $num2 = 0 to 30 step 2
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(183) : GUICtrlCreateinput(stringmid($prem[$num],11+$num2,2),90+(30*(($num2+1)/2)),(20*$num)+20,30,20,$ES_READONLY)' & @crlf) ;### Trace Console
    GUICtrlCreateinput(stringmid($prem[$num],11+$num2,2),90+(30*(($num2+1)/2)),(20*$num)+20,30,20,$ES_READONLY)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(185) : GUICtrlSetColor(-1,0x0000ff)' & @crlf) ;### Trace Console
    GUICtrlSetColor(-1,0x0000ff)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(187) : next' & @crlf) ;### Trace Console
    next

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(190) : Next' & @crlf) ;### Trace Console
    Next
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(192) : EndFunc' & @crlf) ;### Trace Console
    EndFunc

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(195) : Func my_ping()' & @crlf) ;### Trace Console
    Func my_ping()
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(197) : $var = Ping("www.satnet.ch",4000)' & @crlf) ;### Trace Console
    $var = Ping("www.satnet.ch",4000)
    If $var Then; also possible: If @error = 0 Then ...
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(200) : GUISetFont (11, 000, 0, "Arial")' & @crlf) ;### Trace Console
    GUISetFont (11, 000, 0, "Arial")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(202) : GUICtrlCreateLabel("Online - SATNET responds in : " & $var & '' ms'',205,150,400,20,$ES_READONLY)' & @crlf) ;### Trace Console
    GUICtrlCreateLabel("Online - SATNET responds in : " & $var & ' ms',205,150,400,20,$ES_READONLY)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(204) : GUICtrlSetColor(-1,0x009900)' & @crlf) ;### Trace Console
    GUICtrlSetColor(-1,0x009900)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(206) : Else' & @crlf) ;### Trace Console
    Else
    Msgbox(0,"Online Status","Error: " & @error)
    ;~ When the function fails (returns 0) @error contains extended information:
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(210) : ;~ 1 = Host is offline' & @crlf) ;### Trace Console
    ;~ 1 = Host is offline
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(212) : ;~ 2 = Host is unreachable' & @crlf) ;### Trace Console
    ;~ 2 = Host is unreachable
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(214) : ;~ 3 = Bad destination' & @crlf) ;### Trace Console
    ;~ 3 = Bad destination
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(216) : ;~ 4 = Other errors' & @crlf) ;### Trace Console
    ;~ 4 = Other errors
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(218) : EndIf' & @crlf) ;### Trace Console
    EndIf
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(220) : EndFunc' & @crlf) ;### Trace Console
    EndFunc

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(223) : Func _OnlineReadToArray($sURL,ByRef $aArray) ;By GtaSpider' & @crlf) ;### Trace Console
    Func _OnlineReadToArray($sURL,ByRef $aArray) ;By GtaSpider
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(225) : Local $source = _INetGetSource($sURL)' & @crlf) ;### Trace Console
    Local $source = _INetGetSource($sURL)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(227) : $aArray = StringSplit($source, @CRLF)' & @crlf) ;### Trace Console
    $aArray = StringSplit($source, @CRLF)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(229) : EndFunc ;==>_OnlineReadToArray' & @crlf) ;### Trace Console
    EndFunc ;==>_OnlineReadToArray

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(232) : ;___________________________________________________- write new keyfile' & @crlf) ;### Trace Console
    ;___________________________________________________- write new keyfile
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(234) : func make_keyfile()' & @crlf) ;### Trace Console
    func make_keyfile()

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(237) : dim $codes[1000]' & @crlf) ;### Trace Console
    dim $codes[1000]
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(239) : _OnlineReadToArray("http://www.satnet.ch/softcam/Softcam.key",$codes)' & @crlf) ;### Trace Console
    _OnlineReadToArray("http://www.satnet.ch/softcam/Softcam.key",$codes)

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(243) : ; codes sortieren' & @crlf) ;### Trace Console
    ; codes sortieren
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(245) : dim $prem[2]' & @crlf) ;### Trace Console
    dim $prem[2]
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(247) : $zaehler1 = 1' & @crlf) ;### Trace Console
    $zaehler1 = 1
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(249) : For $i = 1 To UBound($codes) - 1 ' & @crlf) ;### Trace Console
    For $i = 1 To UBound($codes) - 1
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(251) : if stringleft($codes[$i],4) = ''N 05'' and not StringInStr($codes[$i],''EMM IDEA'') or stringinstr($codes[$i], "19°") or stringinstr($codes[$i], "ORF") then ' & @crlf) ;### Trace Console
    if stringleft($codes[$i],4) = 'N 05' and not StringInStr($codes[$i],'EMM IDEA') or stringinstr($codes[$i], "19°") or stringinstr($codes[$i], "ORF") then
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(253) : $prem[$zaehler1] = $codes[$i]' & @crlf) ;### Trace Console
    $prem[$zaehler1] = $codes[$i]
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(255) : $zaehler1 = $zaehler1 + 1' & @crlf) ;### Trace Console
    $zaehler1 = $zaehler1 + 1
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(257) : ReDim $prem[$zaehler1+1]' & @crlf) ;### Trace Console
    ReDim $prem[$zaehler1+1]
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(259) : EndIf' & @crlf) ;### Trace Console
    EndIf
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(261) : Next' & @crlf) ;### Trace Console
    Next

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(265) : if FileExists($output) = 1 then filemove($output,"c:\softcam\_____" & @YEAR & "_" & @MON & "_" & @mday & "___" & @HOUR & "_" & @MIN & ".key")' & @crlf) ;### Trace Console
    if FileExists($output) = 1 then filemove($output,"c:\softcam\_____" & @YEAR & "_" & @MON & "_" & @mday & "___" & @HOUR & "_" & @MIN & ".key")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(267) : FileDelete($output)' & @crlf) ;### Trace Console
    FileDelete($output)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(269) : $write = FileOpen($output, 1) ; Zuweisung Datei an Filehandle' & @crlf) ;### Trace Console
    $write = FileOpen($output, 1) ; Zuweisung Datei an Filehandle

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(272) : For $i = 1 To UBound($prem) - 2' & @crlf) ;### Trace Console
    For $i = 1 To UBound($prem) - 2
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(274) : FileWriteLine($output, $prem[$i])' & @crlf) ;### Trace Console
    FileWriteLine($output, $prem[$i])
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(276) : Next' & @crlf) ;### Trace Console
    Next

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(279) : FileClose($write) ; Filehandle schließen' & @crlf) ;### Trace Console
    FileClose($write) ; Filehandle schließen
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(281) : GUISetFont (11, 000, 0, "Arial")' & @crlf) ;### Trace Console
    GUISetFont (11, 000, 0, "Arial")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(283) : GUICtrlCreateLabel(_FileCountLines ($output) & " keys saved in " & $output ,205,150,400,20,$ES_READONLY)' & @crlf) ;### Trace Console
    GUICtrlCreateLabel(_FileCountLines ($output) & " keys saved in " & $output ,205,150,400,20,$ES_READONLY)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(285) : GUICtrlSetColor(-1,0x990000)' & @crlf) ;### Trace Console
    GUICtrlSetColor(-1,0x990000)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(287) : EndFunc' & @crlf) ;### Trace Console
    EndFunc

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(291) : Func update_it()' & @crlf) ;### Trace Console
    Func update_it()
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(293) : if ProcessExists( ''updater.exe'' ) Then ProcessClose("updater.exe")' & @crlf) ;### Trace Console
    if ProcessExists( 'updater.exe' ) Then ProcessClose("updater.exe")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(295) : Run(@comspec & '' /c '' & @ProgramFilesDir & "\updater.exe","",$OPT_ERRORSILENT)' & @crlf) ;### Trace Console
    Run(@comspec & ' /c ' & @ProgramFilesDir & "\updater.exe","",$OPT_ERRORSILENT)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(297) : processwait("updater.exe", 3000)' & @crlf) ;### Trace Console
    processwait("updater.exe", 3000)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(299) : if ProcessExists( ''updater.exe'' ) Then' & @crlf) ;### Trace Console
    if ProcessExists( 'updater.exe' ) Then
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(301) : Else' & @crlf) ;### Trace Console
    Else
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(303) : MsgBox(16,"Achtung", "Der Updater konnte nicht gestartet werden!",15)' & @crlf) ;### Trace Console
    MsgBox(16,"Achtung", "Der Updater konnte nicht gestartet werden!",15)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(305) : EndIf' & @crlf) ;### Trace Console
    EndIf

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

    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(308) : Send("!f") ' & @crlf) ;### Trace Console
    Send("!f")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(310) : Sleep(200)' & @crlf) ;### Trace Console
    Sleep(200)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(312) : Send("o")' & @crlf) ;### Trace Console
    Send("o")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(314) : Sleep(200)' & @crlf) ;### Trace Console
    Sleep(200)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(316) : Send("c:\softcam\neon.key")' & @crlf) ;### Trace Console
    Send("c:\softcam\neon.key")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(318) : Sleep(300)' & @crlf) ;### Trace Console
    Sleep(300)
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(320) : send("!f")' & @crlf) ;### Trace Console
    send("!f")
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(322) : EndFunc' & @crlf) ;### Trace Console
    EndFunc
    FileWriteLine($log,'>Error code: ' & @error & @crlf & @crlf & '@@ Trace(324) : #endregion' & @crlf) ;### Trace Console

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

    Func OnAutoItExit()
    FileClose($log)
    EndFunc

    [/autoit]

    Mfg Spider

  • bingo !!!

    ganau das is es, werd mir mal ein debug-script basteln das den soucecode ändert um deine version zu erreichen
    die idee hat mir gefehlt
    ich werd nur eine kleinigkeit ändern write only if error >0 :D

    big BIGger BIGGEST thx @ GtaSpider

    neon

    • Offizieller Beitrag

    Hallo

    Als erstes musst bei Scite im Menü "Tools" auf "Trace: Add Trace Lines" klicken
    [Blockierte Grafik: http://img-up.net/img/menutZsJcLx7.JPG]
    .
    Danach drücke in SciTe STRG + H. Dann in der Oberen Inputbox ConsoleWrite( einfügen, und in der unteren FileWrite("txt.log",.
    [Blockierte Grafik: http://img-up.net/img/ctrlhTEOVm.JPG]
    Dann nurnoch auf "Replace All" klicken, und Fertig :)

    Nun schreibt er die Daten in die Datei "txt.log" im Scriptverzeichniss.

    Mfg Spider

  • Welches SciTE hast du denn GTA? Bei mir sieht SciTE nämlich so aus:
    (Wie macht ihr es eigentlich immer dass das Bild direkt auf der Website angezeigt werden(siehe Post von GTA Spider))
    Mein SciTE

    Projekte: Keine größeren (und fertigen)
    Gegen Internetzensur:
    https://epetitionen.bundestag.de/index.php?acti…s;petition=3860
    (Zeichnungsfrist abgelaufen)
    __________________________________________________________________________________________________________________________________
    Dieser Beitrag wurde bereits 264 mal editiert, zuletzt von »Fast2« (30. Februar 2009, 12:99)