Jump to content

Using an If Then sleep statement


Recommended Posts

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
Link to comment
Share on other sites

  • Moderators

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

Link to comment
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
 Share

  • Recently Browsing   0 members

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