Sign in to follow this  
Followers 0
deepdown

wait for process

9 posts in this topic

Hello guys i have problem with software for example i have to wait all script for one process when it appears and it is install file with .exe end and i need to shutdown my pc when that process starts i checked the name of process at Task Manager trying that example with WinExists , WinWait.. examples with notepad.exe thats not help any ideas? Thanks for Help

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

ProcessExists

Edit: Look in the help file under this function. The example is pretty much exactly what you are asking for.

Edited by JLogan3o13
1 person likes this

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

whats wrong with that?

If ProcessExists("blabla.exe") Then ; Check if the Notepad process is running. 
Run('"C:\Windows\System32\shutdown.exe" -f -s -t 15') 
EndIf
Edited by deepdown

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

ProcessWait("blabla.exe")  ; Wait for Notepad process
Run('"C:\Windows\System32\shutdown.exe" -f -s -t 15')

Edited by mikell
1 person likes this

Share this post


Link to post
Share on other sites

And what code would be in a different way if this .exe not appears in 2 minutes shutdown windows?

Share this post


Link to post
Share on other sites

Look at the func in the helpfile

Put a timeout and a ProcessExists condition

ProcessWait("notepad.exe", 5)    ; 5 seconds
Msgbox(0,"ProcessExists", (ProcessExists("notepad.exe")<>0) ? "yes" : "no")
1 person likes this

Share this post


Link to post
Share on other sites

deepdown, you have already received some great examples. We tend to try to help you learn how to code, rather than you putting in a request and someone barfing up code for you. How about you try your hand at something, and post here if you run into trouble?


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

im trying im trying because im very new at it thats why i have lot of problems anyway thanks for a help

Edited by deepdown

Share this post


Link to post
Share on other sites

We've all been on Day 1 before. You have received a lot of help thus far. Post what you come up with on your own, based on these suggestions - even if it is not working the way you want it. We'll be happy to assist.


√-1 2^3 ∑ π, and it was delicious!

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