deepdown Posted March 31, 2015 Posted March 31, 2015 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
Moderators JLogan3o13 Posted March 31, 2015 Moderators Posted March 31, 2015 (edited) ProcessExists Edit: Look in the help file under this function. The example is pretty much exactly what you are asking for. Edited March 31, 2015 by JLogan3o13 deepdown 1 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
deepdown Posted March 31, 2015 Author Posted March 31, 2015 (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 March 31, 2015 by deepdown
mikell Posted March 31, 2015 Posted March 31, 2015 (edited) ProcessWait("blabla.exe") ; Wait for Notepad process Run('"C:\Windows\System32\shutdown.exe" -f -s -t 15') Edited March 31, 2015 by mikell deepdown 1
deepdown Posted March 31, 2015 Author Posted March 31, 2015 And what code would be in a different way if this .exe not appears in 2 minutes shutdown windows?
mikell Posted March 31, 2015 Posted March 31, 2015 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") deepdown 1
Moderators JLogan3o13 Posted March 31, 2015 Moderators Posted March 31, 2015 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? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
deepdown Posted March 31, 2015 Author Posted March 31, 2015 (edited) im trying im trying because im very new at it thats why i have lot of problems anyway thanks for a help Edited March 31, 2015 by deepdown
Moderators JLogan3o13 Posted April 1, 2015 Moderators Posted April 1, 2015 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. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
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