Jump to content

Recommended Posts

Posted (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 by aa2zz6
Posted (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 by TheXman
  • Moderators
Posted

@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
 

 

"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!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...