Problem with If.....

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Ghost24de
Newbie
Posts: 13
Joined: Thu Aug 15, 2013 11:24 am

Problem with If.....

Post by Ghost24de » Thu Nov 14, 2013 11:54 pm

Hi again,

i have the following problem.... i think its easy... but i cannt do it, or i dont see anything what is wrong... i dont know.... but i hope you can help me.

ok...
i have a if routine that look if the process Page_Runner.exe is running.
If they is running, he must wait a time (WaitTimePageRunner is here 60sec.)
then they must check it again... and so on.

my problem is, if the exe isn´t running, it works ok and got to the next label.
But if the process is running, they dont go to the next label, this is ok, but they dont wait and dont check it again.

Where is the failur from me?

....
....
....
Label>PagerunnerCheck
//Prüfen ob Page_Runner aktiv ist und evtl. warten
ProcessExists>Page_Runner.exe,Page_RunnerExists
If>Page_RunnerExists=False,PagerunnerCheckok
Endif
Wait>WaitTimePageRunner
Goto>PagerunnerCheck

Label>PagerunnerCheckok
....
....
....

User avatar
PepsiHog
Automation Wizard
Posts: 517
Joined: Wed Apr 08, 2009 4:19 pm
Location: Florida

Post by PepsiHog » Fri Nov 15, 2013 4:18 pm

@ Ghost24de,

See if this helps.

Code: Select all

Label>PagerunnerCheck
//Pr�fen ob Page_Runner aktiv ist und evtl. warten
ProcessExists>Page_Runner.exe,Page_RunnerExists
  If>Page_RunnerExists=True
       Wait>WaitTimePageRunner
       Goto>PagerunnerCheck
     else
       Goto>PagerunnerCheck
  Endif


Label>PagerunnerCheckok
Also, with in-Line If statements you do not need ENDIF. Just a helpful tip.

If>Page_RunnerExists=False,PagerunnerCheckok

If there is no programming between the if statement and the label PagerunnerCheckok then you could even eliminate the Else.

Like this.

Code: Select all

Label>PagerunnerCheck
//Pr�fen ob Page_Runner aktiv ist und evtl. warten
ProcessExists>Page_Runner.exe,Page_RunnerExists
  If>Page_RunnerExists=True
       Wait>WaitTimePageRunner
       Goto>PagerunnerCheck
  Endif


Label>PagerunnerCheckok

PepsiHog
Windows 7

PepsiHog. Yep! I drink LOTS of Pepsi (still..in 2024) AND enjoy programming. (That's my little piece of heaven!)

The immensity of the scope of possibilities within Macro Scheduler pushes the user beyond just macros!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts