Hallo,
ich will mir einen Skript schreiben, der das Spiel Silkroad um eine bestimmte Uhrzeit schließt und danach den PC runterfährt. Ich hab das ganze jetzt in eine GUI eingebaut:
Version 1:
[autoit]#include <GUIConstants.au3>
[/autoit][autoit][/autoit][autoit]GUICreate("SRO - Schließer + PC shutdowner...",300,300)
GUISetState(@sw_show)
$id_label1=GUICtrlCreateLabel("SRO + PC - Schließer^^",16,21,124,18,-1,-1)
$id_label2=GUICtrlCreateLabel("Uhrzeit einstellen",16,68,110,22,-1,-1)
$id_label3=GUICtrlCreateLabel("Stunde",16,130,46,18,-1,-1)
$id_input4=GUICtrlCreateInput("0-24",62,126,30,22,-1,-1)
$id_label5=GUICtrlCreateLabel("Minute",125,130,44,13,-1,-1)
$id_input6=GUICtrlCreateInput("0-60",175,127,31,22,-1,-1)
$id_button7=GUICtrlCreateButton("Los Gehts",97,233,88,36,-1,-1)
While 1
$msg = GUIGetMsg()
Select
case $msg = $id_button7
GUICtrlRead($id_input4)
GUICtrlRead($id_input6)
If @HOUR $id_input4 and @MIN $id_input6 Then
ProcessClose("sro_client.exe")
sleep(10000)
Shutdown(1)
sleep(50000)
Shutdown(8)
EndIf
Case $msg = $GUI_EVENT_CLOSE
MsgBox(0, "Close......", "created by Michi")
ExitLoop
EndSelect
WEnd
Version 2:
[autoit]#include <GUIConstants.au3>
[/autoit][autoit][/autoit][autoit]GUICreate("SRO - Schließer + PC shutdowner...",300,300)
GUISetState(@sw_show)
$id_label1=GUICtrlCreateLabel("SRO + PC - Schließer^^",16,21,124,18,-1,-1)
$id_label2=GUICtrlCreateLabel("Uhrzeit einstellen",16,68,110,22,-1,-1)
$id_label3=GUICtrlCreateLabel("Stunde",16,130,46,18,-1,-1)
$id_input4=GUICtrlCreateInput("0-24",62,126,30,22,-1,-1)
$id_label5=GUICtrlCreateLabel("Minute",125,130,44,13,-1,-1)
$id_input6=GUICtrlCreateInput("0-60",175,127,31,22,-1,-1)
$id_button7=GUICtrlCreateButton("Los Gehts",97,233,88,36,-1,-1)
While 1
$msg = GUIGetMsg()
Select
case $msg = $id_button7
If @HOUR $id_input4 and @MIN $id_input6 Then
ProcessClose("sro_client.exe")
sleep(10000)
Shutdown(1)
sleep(50000)
Shutdown(8)
EndIf
Case $msg = $GUI_EVENT_CLOSE
MsgBox(0, "Close......", "created by Michi")
ExitLoop
EndSelect
WEnd
Ich weiß echt nicht mehr weiter....
Jetz schon einmal danke für eure hilfe
Gruß Michi