wootn0w Posted September 21, 2005 Posted September 21, 2005 Sup guys, here is my problem: Half Life dedicated server doesnt restart automatically, so when ever i want to restart it for a password reset over rcon, the server will just shut down. I got the movement and clicks and repeating code done (just need to put in specific values) but i cant figure out a methode (looked at some other posts) to wait until a specific window closes... any hints ? ill search on maybe i find something but help is appriciated. here is my current code: ;wait for the window to close hlds ;do until window = 0 then ;move mouse to hlds.exe and double click MouseMove(x, y) MouseClick("left") MouseClick("left") ;wait 10 seconds until server boot's then click once to start Sleep(10000) MouseMove(x, y) MouseClick("left") ;repeat from beginning
Valuater Posted September 21, 2005 Posted September 21, 2005 maybe this ??? expandcollapse popup; Press Esc to terminate script, Pause/Break to "pause" Global $Paused HotKeySet("{F!}", "Set_Run") HotKeySet("{ESC}", "Terminate") HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d ;;;; Body of program would go here;;;; While 1 Sleep(100) WEnd ;;;;;;;; Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"by QTasc","This is a message. ") EndFunc Func Set_Run() Do $win = WinWaitClose("?TITLE of WINDOW?") ;wait for the window to close hlds Until $win = 0 ;move mouse to hlds.exe and double click MouseMove(x, y) MouseClick("left") MouseClick("left") ;wait 10 seconds until server boot's then click once to start Sleep(10000) MouseMove(x, y) MouseClick("left") ;repeat from beginning EndFunc hope that helps 8)
wootn0w Posted September 21, 2005 Author Posted September 21, 2005 (edited) K i got the part of the if window is closed do this im working on my own version now thx for the info. I got one question though. Is there a Goto command ? cause that would be sweeeet for instance if x = x do this else goto beginning of script EDIT:I just searched and noticed some post about there not being a goto command too bad would make life easier well here is my code so far, im trying to find another way with a conditional statement of some sort. if you could lead me ahead plz thx CODE: Do $win = WinWaitClose("window title here") ;wait for the window to close hlds Until $win = 0 $win = $win If $win = 0 Then ;move mouse to hlds.exe and double click MouseMove(574, 22) MouseClick("left") MouseClick("left") ;wait 10 seconds until server boot's then click once to start Sleep(10000) MouseMove(527, 520) MouseClick("left") Sleep(100000) Else EndIf Edited September 21, 2005 by wootn0w
Valuater Posted September 21, 2005 Posted September 21, 2005 yes... formated like this If $x = 1 then Call("More") Func More() msgbox(0,"test", " by QTasc ") EndFunc 8)
wootn0w Posted September 21, 2005 Author Posted September 21, 2005 alright i shall try that 2nite ill let you know if it works thx so far
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now