aa2zz6 Posted June 9, 2018 Share Posted June 9, 2018 (edited) Can someone explain how sleep works without defining an actual delay time. I figured it wouldn't work without a delay but it does after an If Then statement. Thanks If ProcessExists("Setup.exe") Then Sleep Edited June 9, 2018 by aa2zz6 Link to comment Share on other sites More sharing options...
TheXman Posted June 9, 2018 Share Posted June 9, 2018 (edited) 12 minutes ago, aa2zz6 said: Can someone explain how sleep works without defining an actual delay time Actually, it doesn't. If the process doesn't exist, it won't try to execute the statement. If the process does exist, you will get a runtime error. What lead you to believe that it did work? Did you not try it for yourself? Edited June 9, 2018 by TheXman aa2zz6 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
AutoBert Posted June 9, 2018 Share Posted June 9, 2018 Sleep isn't working when the process not exists. This script: If ProcessExists("Setup.exe") Then Sleep If Not ProcessExists("Setup.exe") Then Sleep must crash. aa2zz6 1 Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted June 9, 2018 Moderators Share Posted June 9, 2018 @aa2zz6 if you were using the full SciTE, that would throw a syntax error before it even got started: Quote "C:\Users\JLogan\Desktop\Test2.au3" (1) : ==> Error parsing function call.: if ProcessExists("Notepad.exe") Then Sleep if ProcessExists("Notepad.exe") Then ^ ERROR aa2zz6 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! Link to comment Share on other sites More sharing options...
aa2zz6 Posted June 9, 2018 Author Share Posted June 9, 2018 hmm, okay, I will need to look at this. 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