kingpinzs Posted March 30, 2011 Share Posted March 30, 2011 how can I wait for a process to exit but still let the script to run so I can exit the script even when a program is running. I am trying to make a script that will run scanner software that will check for viruses and maleware and clean the hdd one at a time but allow me to close the app if it is taking to long and move on to the next one and also let me exit at any time? Any ideas? Link to comment Share on other sites More sharing options...
kingpinzs Posted March 30, 2011 Author Share Posted March 30, 2011 another words I am trying to make the programs run one at a time but allow the script to exit at any time So I cant use runwait cause it pauses the script and cant exit the script Link to comment Share on other sites More sharing options...
kingpinzs Posted March 30, 2011 Author Share Posted March 30, 2011 is there a way to execute exe's one at a time wating for one to finsh before the other one starts without pausing the script Link to comment Share on other sites More sharing options...
saywell Posted March 30, 2011 Share Posted March 30, 2011 allow me to close the app if it is taking too longIf you can define 'too long' you could start the program with a run command, and then use ProcessWaitClose to wait until it has finished, and just put the timeout value in as the last argument.William Link to comment Share on other sites More sharing options...
kingpinzs Posted March 30, 2011 Author Share Posted March 30, 2011 what I mean as to long is if it is not responding or locks up Link to comment Share on other sites More sharing options...
kaotkbliss Posted March 30, 2011 Share Posted March 30, 2011 I would think a hotkeyset would be the best route to go because too long usually depends on mood. Sometimes too long could be a few minutes, sometimes an entire day. Implementing the hotkey to skip a process depends on how you set up the script, but I would think the function would work something like Func _skip($process) processclose($process) EndFunc Your script would probably have a runwait for each section it needs to run, so when the process exits, the script knows to move on to the next 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
kingpinzs Posted March 30, 2011 Author Share Posted March 30, 2011 I would think a hotkeyset would be the best route to go because too long usually depends on mood. Sometimes too long could be a few minutes, sometimes an entire day.Implementing the hotkey to skip a process depends on how you set up the script, but I would think the function would work something likeFunc _skip($process)processclose($process)EndFuncYour script would probably have a runwait for each section it needs to run, so when the process exits, the script knows to move on to the nextDoesnt runwait pause the script so I cant do anything tell the runwait is over? Link to comment Share on other sites More sharing options...
kaotkbliss Posted March 30, 2011 Share Posted March 30, 2011 I think there is something with hotkey (and maybe onevent) that allows it to interrupt. If it can't interrupt the runwait, then you can use some other method to "pause" the script. I usually use a pixelsearch or pixelgetcolor on a spot I know is going to change when the app is finished. I put the search in a loop that does a small sleep(10) until the color is found (or not found) 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! 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