Sign in to follow this  
Followers 0
kingpinzs

need help running files with script

8 posts in this topic

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?

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

allow me to close the app if it is taking too long

If 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

Share this post


Link to post
Share on other sites

what I mean as to long is if it is not responding or locks up

Share this post


Link to post
Share on other sites

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 game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

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

Doesnt runwait pause the script so I cant do anything tell the runwait is over?

Share this post


Link to post
Share on other sites

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 game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0