Button Funktion /GUI

  • Hallo zusammen,
    ich habe noch mal eine Frage

    Wie kann ich mein "OK" Button (GUI) auf den Programmanfang weiterleiten?
    Hier die OK Taste

    [autoit]

    Case $OK =

    [/autoit]

    Mein Programm beginnt dann mit

    [autoit]

    RunWait......

    [/autoit]

    Danke im Voraus

  • Danke für deine Antwort,
    habe Code geändert funzt jedoch nicht. :huh:

    Es ist mein erstes GUI mit viel Hilfe!
    Ich hatte vorher alle Abfragen per Inputbox nach allen Eingaben startete das Programm.

    Nun sind die Eingaben per GUI und "OK" soll das Programm starten.
    Habe aber noch keine Idee wie....


    Danke!

    • Offizieller Beitrag

    Poste mal dein Script und erkläre mal ein bischen genauer was du vorhast. Hab nicht wirklich verstanden was du überhaupt willst.

  • Hier ist der erste Teil des Scripts:

    Im GUI werden einige Variablen gesetzt :
    Also Path-> Speicherort
    Drive -> Laufwerk
    Comport-> Comport
    Time -> Programminterne Wartezeit
    Anzahl -> Anzahl für Counter
    Main/Full/Menu -> Als Radio Button als es kann nur einer der Werte übergeben werden

    Wenn ich nun alle Variablen gesetzt habe , soll mit "OK" das Programm gestartet werden ......aber wie?


    [autoit]

    #include <GUIConstants.au3>

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

    #region ### START Koda GUI section ###
    $Form1 = GUICreate("Setup", 539, 366, 222, 245)
    $Path = GUICtrlCreateInput("Path", 40, 64, 153, 25)
    $Browse = GUICtrlCreateButton("Browse", 208, 64, 65, 25, 0)
    $Drive = GUICtrlCreateCombo("Drive", 336, 64, 153, 25)
    $Comport = GUICtrlCreateCombo("COM", 40, 120, 153, 25)
    $Radio_Full = GUICtrlCreateRadio("Full", 48, 240, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Radio_Menu = GUICtrlCreateRadio("Menu", 48, 176, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Radio_Main = GUICtrlCreateRadio("Main", 48, 208, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $OK = GUICtrlCreateButton("OK", 296, 280, 105, 41, 0)
    $Anzahl = GUICtrlCreateInput("1", 336, 120, 153, 21)
    $Time = GUICtrlCreateInput("25", 336, 176, 153, 21)
    $Abbrechen = GUICtrlCreateButton("Abbrechen", 128, 280, 105, 41, 0)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    GUICtrlSetData($Drive, _GetDrives())
    $sCom = ""
    For $i = 1 To 20
    $sCom &= $i & "|"
    GUICtrlSetData($Comport, $sCom)
    Next

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE, $Abbrechen
    Exit
    Case $Browse
    GUICtrlSetData($Path, FileSelectFolder("Pfad auswählen", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"))
    Case $Radio_Full
    $sFunktion = "/FULL"
    Case $Radio_Menu
    $sFunktion = "/MENU"
    Case $Radio_Main
    $sFunktion = "/MAIN"
    Case $OK
    Exit ShellExecute(@ScriptFullPath)
    $sDrive = GUICtrlRead($Drive)
    $sPath = GUICtrlRead($Path)
    $sComport = GUICtrlRead($Comport)
    $iAnzahl = GUICtrlRead($Anzahl)
    $iTime = GUICtrlRead($Time)
    EndSwitch
    WEnd

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

    Func _GetDrives()
    $sCD_Drives = ""
    $aDrives = DriveGetDrive("CDROM")

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

    For $i = 1 To $aDrives[0]
    $sCD_Drives &= StringUpper($aDrives[$i]) & "|"
    Next

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

    Return $sCD_Drives
    EndFunc ;==>_GetDrives

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

    $Version = ('V:X:30:2:E');Robotic Version Info Command
    $Calibration = ('C:X:30:2:E');Calibration Command
    $Load = ('I:X:30:2:E');Get Input (load) Command
    $Unload = ('A:X:30:2:E');Unload the Drive Command
    Global $iCount = 1
    Global $sCom, $funktion

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

    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --command='&$Version&'')
    sleep(1000)
    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --command='&$Calibration&'')
    sleep(1000)
    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --open --command='&$Load&' --ifcommandfailortimeoutskip=failedload --set=loaderrors:0:robot --skip=trayanddiscin --label=failedload --skip=loadmorediscs --label=loadmorediscs --notify="You can cancel the batch with Abort. Hit Retry only after you load more discs on the spindle and CLEAR REJECTS. Hit Ignore if the disc loaded correctly.":"Load may have failed for drive {drive} on port {comport}.":2 --set=rc:{notifyreturncode} --ifsetskip=rc:3:shutdown --ifsetskip=rc:4:resetloaderrors --ifsetskip=rc:5:trayanddiscin --skip=failedload --label=resetloaderrors --set=loaderrors:0:robot --rejectsreset --skip=doreset --label=trayanddiscin --closeblind --sleep='&$Time&' --unbindtodrive --comportrelease --label=successexit --exit=0 ')
    Sleep(2000)
    ToolTip("Disk" &$iCount)
    Runwait('auto.exe '&$Drive&' '&$Path&' '&$funktion&' /GUI')
    sleep(3000)
    CDTray($drive,"open")
    sleep(1000)
    While True
    $status=DriveStatus($Drive)
    If ($status = "NOTREADY") Then
    If $iCount < $Anzahl Then
    _next()
    $iCount += 1
    ToolTip("Disc" &$iCount)
    Else
    Ru

    [/autoit]
  • Hallo SonyMan,

    mache eine func daraus und rufe diese auf:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

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

    #region ### START Koda GUI section ###
    $Form1 = GUICreate("Setup", 539, 366, 222, 245)
    $Path = GUICtrlCreateInput("Path", 40, 64, 153, 25)
    $Browse = GUICtrlCreateButton("Browse", 208, 64, 65, 25, 0)
    $Drive = GUICtrlCreateCombo("Drive", 336, 64, 153, 25)
    $Comport = GUICtrlCreateCombo("COM", 40, 120, 153, 25)
    $Radio_Full = GUICtrlCreateRadio("Full", 48, 240, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Radio_Menu = GUICtrlCreateRadio("Menu", 48, 176, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Radio_Main = GUICtrlCreateRadio("Main", 48, 208, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $OK = GUICtrlCreateButton("OK", 296, 280, 105, 41, 0)
    $Anzahl = GUICtrlCreateInput("1", 336, 120, 153, 21)
    $Time = GUICtrlCreateInput("25", 336, 176, 153, 21)
    $Abbrechen = GUICtrlCreateButton("Abbrechen", 128, 280, 105, 41, 0)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    GUICtrlSetData($Drive, _GetDrives())
    $sCom = ""
    For $i = 1 To 20
    $sCom &= $i & "|"
    GUICtrlSetData($Comport, $sCom)
    Next

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE, $Abbrechen
    Exit
    Case $Browse
    GUICtrlSetData($Path, FileSelectFolder("Pfad auswählen", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"))
    Case $Radio_Full
    $sFunktion = "/FULL"
    Case $Radio_Menu
    $sFunktion = "/MENU"
    Case $Radio_Main
    $sFunktion = "/MAIN"
    Case $OK
    Global $sDrive = GUICtrlRead($Drive)
    Global $sPath = GUICtrlRead($Path)
    Global $sComport = GUICtrlRead($Comport)
    Global $iAnzahl = GUICtrlRead($Anzahl)
    Global $iTime = GUICtrlRead($Time)

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

    EndSwitch
    WEnd

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

    Func _GetDrives()
    $sCD_Drives = ""
    $aDrives = DriveGetDrive("CDROM")

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

    For $i = 1 To $aDrives[0]
    $sCD_Drives &= StringUpper($aDrives[$i]) & "|"
    Next

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

    Return $sCD_Drives
    EndFunc ;==>_GetDrives

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

    func doIt()
    $Version = ('V:X:30:2:E');Robotic Version Info Command
    $Calibration = ('C:X:30:2:E');Calibration Command
    $Load = ('I:X:30:2:E');Get Input (load) Command
    $Unload = ('A:X:30:2:E');Unload the Drive Command
    Global $iCount = 1
    Global $sCom, $funktion

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

    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --command='&$Version&'')
    sleep(1000)
    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --command='&$Calibration&'')
    sleep(1000)
    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --open --command='&$Load&' --ifcommandfailortimeoutskip=failedload --set=loaderrors:0:robot --skip=trayanddiscin --label=failedload --skip=loadmorediscs --label=loadmorediscs --notify="You can cancel the batch with Abort. Hit Retry only after you load more discs on the spindle and CLEAR REJECTS. Hit Ignore if the disc loaded correctly.":"Load may have failed for drive {drive} on port {comport}.":2 --set=rc:{notifyreturncode} --ifsetskip=rc:3:shutdown --ifsetskip=rc:4:resetloaderrors --ifsetskip=rc:5:trayanddiscin --skip=failedload --label=resetloaderrors --set=loaderrors:0:robot --rejectsreset --skip=doreset --label=trayanddiscin --closeblind --sleep='&$Time&' --unbindtodrive --comportrelease --label=successexit --exit=0 ')
    Sleep(2000)
    ToolTip("Disk" &$iCount)
    Runwait('auto.exe '&$Drive&' '&$Path&' '&$funktion&' /GUI')
    sleep(3000)
    CDTray($drive,"open")
    sleep(1000)
    While True
    $status=DriveStatus($Drive)
    If ($status = "NOTREADY") Then
    If $iCount < $Anzahl Then
    _next()
    $iCount += 1
    ToolTip("Disc" &$iCount)
    Else
    Ru
    ;Originalpost war unvollständig also ungeetestet
    endfunc

    [/autoit]

    mfg (Auto)Bert

  • Hallo (Auto)Bert
    vielen Dank für deine Antwort.

    Ich habe den Code geändert, (Funktion) eingebaut aber auf "OK" tut sich noch nichts.
    Darum poste ich das Script mal komplett.


    Danke für die Unterstützung!

    Gruß Bastian

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

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

    #region ### START Koda GUI section ###
    $Form1 = GUICreate("Setup", 539, 366, 222, 245)
    $Path = GUICtrlCreateInput("Path", 40, 64, 153, 25)
    $Browse = GUICtrlCreateButton("Browse", 208, 64, 65, 25, 0)
    $Drive = GUICtrlCreateCombo("Drive", 336, 64, 153, 25)
    $Comport = GUICtrlCreateCombo("COM", 40, 120, 153, 25)
    $Radio_Full = GUICtrlCreateRadio("Full", 48, 240, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Radio_Menu = GUICtrlCreateRadio("Menu", 48, 176, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Radio_Main = GUICtrlCreateRadio("Main", 48, 208, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $OK = GUICtrlCreateButton("OK", 296, 280, 105, 41, 0)
    $Anzahl = GUICtrlCreateInput("1", 336, 120, 153, 21)
    $Time = GUICtrlCreateInput("25", 336, 176, 153, 21)
    $Abbrechen = GUICtrlCreateButton("Abbrechen", 128, 280, 105, 41, 0)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    GUICtrlSetData($Drive, _GetDrives())
    $sCom = ""
    For $i = 1 To 20
    $sCom &= $i & "|"
    GUICtrlSetData($Comport, $sCom)
    Next

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE, $Abbrechen
    Exit
    Case $Browse
    GUICtrlSetData($Path, FileSelectFolder("Pfad auswählen", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"))
    Case $Radio_Full
    $sFunktion = "/FULL"
    Case $Radio_Menu
    $sFunktion = "/MENU"
    Case $Radio_Main
    $sFunktion = "/MAIN"
    Case $OK
    Global $sDrive = GUICtrlRead($Drive)
    Global $sPath = GUICtrlRead($Path)
    Global $sComport = GUICtrlRead($Comport)
    Global $iAnzahl = GUICtrlRead($Anzahl)
    Global $iTime = GUICtrlRead($Time)

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

    EndSwitch
    WEnd

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

    Func _GetDrives()
    $sCD_Drives = ""
    $aDrives = DriveGetDrive("CDROM")

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

    For $i = 1 To $aDrives[0]
    $sCD_Drives &= StringUpper($aDrives[$i]) & "|"
    Next

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

    Return $sCD_Drives
    EndFunc ;==>_GetDrives

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

    $Version = ('V:X:30:2:E');Robotic Version Info Command
    $Calibration = ('C:X:30:2:E');Calibration Command
    $Load = ('I:X:30:2:E');Get Input (load) Command
    $Unload = ('A:X:30:2:E');Unload the Drive Comman

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

    Global $iCount = 1
    Global $sCom, $funktion

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

    func doIt()

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

    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --command='&$Version&'')
    sleep(1000)
    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --command='&$Calibration&'')
    sleep(1000)
    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --open --command='&$Load&' --ifcommandfailortimeoutskip=failedload --set=loaderrors:0:robot --skip=trayanddiscin --label=failedload --skip=loadmorediscs --label=loadmorediscs --notify="You can cancel the batch with Abort. Hit Retry only after you load more discs on the spindle and CLEAR REJECTS. Hit Ignore if the disc loaded correctly.":"Load may have failed for drive {drive} on port {comport}.":2 --set=rc:{notifyreturncode} --ifsetskip=rc:3:shutdown --ifsetskip=rc:4:resetloaderrors --ifsetskip=rc:5:trayanddiscin --skip=failedload --label=resetloaderrors --set=loaderrors:0:robot --rejectsreset --skip=doreset --label=trayanddiscin --closeblind --sleep='&$Time&' --unbindtodrive --comportrelease --label=successexit --exit=0 ')
    Sleep(2000)
    ToolTip("Disk" &$iCount)
    Runwait('auto.exe '&$Drive&' '&$Path&' '&$funktion&' /GUI')
    sleep(3000)
    CDTray($drive,"open")
    sleep(1000)
    EndFunc

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

    While True
    $status=DriveStatus($Drive)
    If ($status = "NOTREADY") Then
    If $iCount < $Anzahl Then
    _next()
    $iCount += 1
    ToolTip("Disc" &$iCount)
    Else
    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --open --command='&$Unload&' --close --ifcommandfailortimeoutskip=failedexit --comportrelease --skip=successexit --label=failedexit --notify="Problem with robot on port {comport} for drive {drive}, shutting down..." --set=shutdown:yes:robot --skip=shutdown --exit=0 --label=successexit --exit=0 --label=shutdown --set=needsreset:yes:robot --messagefile={passerrorsback} --message="[cancel batch]" --exit')
    Sleep(1000)
    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --command='&$Calibration&'')
    sleep(1000)
    MsgBox(4096,"Programminfo","FERTIG!" &@CRLF& "BYE BYE...",10)
    sleep(1000)
    ExitLoop
    EndIf
    Endif
    sleep(1000)
    WEnd
    Func _next()
    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --open --command='&$Unload&' --ifcommandfailortimeoutskip=failedexit --comportrelease --skip=successexit --label=failedexit --notify="Problem with robot on port {comport} for drive {drive}, shutting down..." --set=shutdown:yes:robot --skip=shutdown --exit=0 --label=successexit --exit=0 --label=shutdown --set=needsreset:yes:robot --messagefile={passerrorsback} --message="[cancel batch]" --exit')
    RunWait('load.exe --comport='&$Comport&' --drive='&$Drive&' --command='&$Load&' --ifcommandfailortimeoutskip=failedload --set=loaderrors:0:robot --skip=trayanddiscin --label=failedload --skip=loadmorediscs --label=loadmorediscs --notify="You can cancel the batch with Abort. Hit Retry only after you load more discs on the spindle and CLEAR REJECTS. Hit Ignore if the disc loaded correctly.":"Load may have failed for drive {drive} on port {comport}.":2 --set=rc:{notifyreturncode} --ifsetskip=rc:3:shutdown --ifsetskip=rc:4:resetloaderrors --ifsetskip=rc:5:trayanddiscin --skip=failedload --label=resetloaderrors --set=loaderrors:0:robot --rejectsreset --skip=doreset --label=trayanddiscin --closeblind --sleep='&$Time&' --unbindtodrive --comportrelease --label=successexit --exit=0')
    Sleep(2000)
    Runwait('auto.exe '&$Drive&' '&$PATH&' '&$funktion&' [/BATCH]')
    Sleep(3000)
    CDTray($Drive,"open")
    Sleep(1000)
    EndFunc
    Func _exit()
    Exit
    EndFunc

    [/autoit]
  • Hallo SonyMan,

    Da habe ich doch tatsächlich vergessen die func aufzrufen,sorry war vorhin anscheinend abgelenkt. Hier das geänderte Skript:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstants.au3>

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

    $Version = ('V:X:30:2:E');Robotic Version Info Command
    $Calibration = ('C:X:30:2:E');Calibration Command
    $Load = ('I:X:30:2:E');Get Input (load) Command
    $Unload = ('A:X:30:2:E');Unload the Drive Comman

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

    Global $iCount = 1
    Global $sCom, $funktion

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

    #region ### START Koda GUI section ###
    $Form1 = GUICreate("Setup", 539, 366, 222, 245)
    $Path = GUICtrlCreateInput("Path", 40, 64, 153, 25)
    $Browse = GUICtrlCreateButton("Browse", 208, 64, 65, 25, 0)
    $Drive = GUICtrlCreateCombo("Drive", 336, 64, 153, 25)
    $Comport = GUICtrlCreateCombo("COM", 40, 120, 153, 25)
    $Radio_Full = GUICtrlCreateRadio("Full", 48, 240, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Radio_Menu = GUICtrlCreateRadio("Menu", 48, 176, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $Radio_Main = GUICtrlCreateRadio("Main", 48, 208, 113, 17)
    GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
    $OK = GUICtrlCreateButton("OK", 296, 280, 105, 41, 0)
    $Anzahl = GUICtrlCreateInput("1", 336, 120, 153, 21)
    $Time = GUICtrlCreateInput("25", 336, 176, 153, 21)
    $Abbrechen = GUICtrlCreateButton("Abbrechen", 128, 280, 105, 41, 0)
    GUISetState(@SW_SHOW)
    #endregion ### END Koda GUI section ###

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

    GUICtrlSetData($Drive, _GetDrives())
    $sCom = ""
    For $i = 1 To 20
    $sCom &= $i & "|"
    Next
    GUICtrlSetData($Comport, $sCom)

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE, $Abbrechen
    Exit
    Case $Browse
    GUICtrlSetData($Path, FileSelectFolder("Pfad auswählen", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}"))
    Case $Radio_Full
    $sFunktion = "/FULL"
    Case $Radio_Menu
    $sFunktion = "/MENU"
    Case $Radio_Main
    $sFunktion = "/MAIN"
    Case $OK
    Global $sDrive = GUICtrlRead($Drive)
    Global $sPath = GUICtrlRead($Path)
    Global $sComport = GUICtrlRead($Comport)
    Global $iAnzahl = GUICtrlRead($Anzahl)
    Global $iTime = GUICtrlRead($Time)
    doIt()
    EndSwitch
    WEnd

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

    Func _GetDrives()
    $sCD_Drives = ""
    $aDrives = DriveGetDrive("CDROM")
    If IsArray($aDrives) Then
    For $i = 1 To $aDrives[0]
    $sCD_Drives &= StringUpper($aDrives[$i]) & "|"
    Next
    EndIf
    Return $sCD_Drives
    EndFunc ;==>_GetDrives

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

    Func doIt()
    ConsoleWrite("doIT" & @CRLF)

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

    RunWait('load.exe --comport=' & $Comport & ' --drive=' & $Drive & ' --command=' & $Version & '')
    Sleep(1000)
    RunWait('load.exe --comport=' & $Comport & ' --drive=' & $Drive & ' --command=' & $Calibration & '')
    Sleep(1000)
    RunWait('load.exe --comport=' & $Comport & ' --drive=' & $Drive & ' --open --command=' & $Load & ' --ifcommandfailortimeoutskip=failedload --set=loaderrors:0:robot --skip=trayanddiscin --label=failedload --skip=loadmorediscs --label=loadmorediscs --notify="You can cancel the batch with Abort. Hit Retry only after you load more discs on the spindle and CLEAR REJECTS. Hit Ignore if the disc loaded correctly.":"Load may have failed for drive {drive} on port {comport}.":2 --set=rc:{notifyreturncode} --ifsetskip=rc:3:shutdown --ifsetskip=rc:4:resetloaderrors --ifsetskip=rc:5:trayanddiscin --skip=failedload --label=resetloaderrors --set=loaderrors:0:robot --rejectsreset --skip=doreset --label=trayanddiscin --closeblind --sleep=' & $Time & ' --unbindtodrive --comportrelease --label=successexit --exit=0 ')
    Sleep(2000)
    ToolTip("Disk" & $iCount)
    RunWait('auto.exe ' & $Drive & ' ' & $Path & ' ' & $funktion & ' /GUI')
    Sleep(3000)
    CDTray($Drive, "open")
    Sleep(1000)

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

    While True
    $status = DriveStatus($Drive)
    If ($status = "NOTREADY") Then
    If $iCount < $Anzahl Then
    _next()
    $iCount += 1
    ToolTip("Disc" & $iCount)
    Else
    RunWait('load.exe --comport=' & $Comport & ' --drive=' & $Drive & ' --open --command=' & $Unload & ' --close --ifcommandfailortimeoutskip=failedexit --comportrelease --skip=successexit --label=failedexit --notify="Problem with robot on port {comport} for drive {drive}, shutting down..." --set=shutdown:yes:robot --skip=shutdown --exit=0 --label=successexit --exit=0 --label=shutdown --set=needsreset:yes:robot --messagefile={passerrorsback} --message="[cancel batch]" --exit')
    Sleep(1000)
    RunWait('load.exe --comport=' & $Comport & ' --drive=' & $Drive & ' --command=' & $Calibration & '')
    Sleep(1000)
    MsgBox(4096, "Programminfo", "FERTIG!" & @CRLF & "BYE BYE...", 10)
    Sleep(1000)
    ExitLoop
    EndIf
    EndIf
    Sleep(1000)
    WEnd
    EndFunc ;==>doIt

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

    Func _next()
    RunWait('load.exe --comport=' & $Comport & ' --drive=' & $Drive & ' --open --command=' & $Unload & ' --ifcommandfailortimeoutskip=failedexit --comportrelease --skip=successexit --label=failedexit --notify="Problem with robot on port {comport} for drive {drive}, shutting down..." --set=shutdown:yes:robot --skip=shutdown --exit=0 --label=successexit --exit=0 --label=shutdown --set=needsreset:yes:robot --messagefile={passerrorsback} --message="[cancel batch]" --exit')
    RunWait('load.exe --comport=' & $Comport & ' --drive=' & $Drive & ' --command=' & $Load & ' --ifcommandfailortimeoutskip=failedload --set=loaderrors:0:robot --skip=trayanddiscin --label=failedload --skip=loadmorediscs --label=loadmorediscs --notify="You can cancel the batch with Abort. Hit Retry only after you load more discs on the spindle and CLEAR REJECTS. Hit Ignore if the disc loaded correctly.":"Load may have failed for drive {drive} on port {comport}.":2 --set=rc:{notifyreturncode} --ifsetskip=rc:3:shutdown --ifsetskip=rc:4:resetloaderrors --ifsetskip=rc:5:trayanddiscin --skip=failedload --label=resetloaderrors --set=loaderrors:0:robot --rejectsreset --skip=doreset --label=trayanddiscin --closeblind --sleep=' & $Time & ' --unbindtodrive --comportrelease --label=successexit --exit=0')
    Sleep(2000)
    RunWait('auto.exe ' & $Drive & ' ' & $Path & ' ' & $funktion & ' [/BATCH]')
    Sleep(3000)
    CDTray($Drive, "open")
    Sleep(1000)
    EndFunc ;==>_next

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

    Func _exit()
    Exit
    EndFunc ;==>_exit

    [/autoit]

    mfg (Auto)Bert