tes5884 Posted July 10, 2012 Share Posted July 10, 2012 (edited) Hi Everyone,I'm obviously a newb. Any help would be appreciated.I made a application that let's me check a bunch of boxes and it installs applications based on my selection.The reason I chose RunWait is because I don't want multiple apps to attempt to install at once.My question is, if an app install crashes I can't quit the script, because it's waiting for the install to finish. How would i use a $kill button, or something similar to exit and kill the script?http://pastebin.com/PY99UTZ7 <- this is the entire script.Thanks!$button = GUICtrlCreateButton("Install", 83, 332, 100, 30, -1, -1) While 1 $nMsg = GUIGetMsg() if $nMsg = $button Then if GUICtrlRead($vlc) = $GUI_Checked Then RunWait("vlc-2.0.2-win32.exe /S") EndIf If $nMsg = $GUI_EVENT_CLOSE then Exit WEnd Edited July 10, 2012 by tes5884 www.tspitz.com Link to comment Share on other sites More sharing options...
Bert Posted July 10, 2012 Share Posted July 10, 2012 You may want to look at the The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
DicatoroftheUSA Posted July 10, 2012 Share Posted July 10, 2012 (edited) Just use run, and then use the PID to manipulate it however you want via timeout, hotkey, whatever. Something like $iPID=run("whatever.exe") while 1 sleep(100) if _condition($iPID)=1 then exitloop wend Edited July 10, 2012 by DicatoroftheUSA Statism is violence, Taxation is theft. Autoit Wiki Link to comment Share on other sites More sharing options...
tes5884 Posted July 10, 2012 Author Share Posted July 10, 2012 Just use run, and then use the PID to manipulate it however you want via timeout, hotkey, whatever.Something like$iPID=run("whatever.exe")while 1sleep(100)if _condition($iPID)=1 then exitloopwend Would I then have to figure a timeout value for each application? So figure out how long each install would take? Thanks www.tspitz.com Link to comment Share on other sites More sharing options...
Shaggi Posted July 10, 2012 Share Posted July 10, 2012 Would I then have to figure a timeout value for each application? So figure out how long each install would take?Thanksuse ProcessExists to check if the.. well, if the process exists Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG Link to comment Share on other sites More sharing options...
rvn Posted July 11, 2012 Share Posted July 11, 2012 (edited) "timeout" not gonna work,,, depend on computer speedor u can check the title,,, sometimes there is clues... event the app progress,,, example ghost32..go check Window Management in Help File The others way,,, check control text or status text (if exist)... go to Help File again... Edited July 11, 2012 by rvn Link to comment Share on other sites More sharing options...
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