Trying to check if a program is running & then (read mor

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
RykerS
Newbie
Posts: 4
Joined: Mon Jan 02, 2012 6:07 pm

Trying to check if a program is running & then (read mor

Post by RykerS » Fri Jun 01, 2012 3:07 pm

Hello,

I was unable to find what I was looking for in the search on the site, so sorry in advance if I missed what may have already been answered.

I'm currently trying to run a compiled script on my desktop, and at the end of the script have it check if a certain program is running. If the program is not running, I would like it to run a few lines of code, but if the program is running. I would like to skip those lines of code and continue running the rest of the script.

I hope that was not too confusing, and if anyone could point me in the right direction or give me an example. It would be greatly appreciated!

As well if you need any other information I will be happy to provide it!

Thanks,



Ryker - :wink:
Ryker S.

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Fri Jun 01, 2012 3:53 pm

Here are a couple of examples.

This example checks if a process of a specified program exists. In this example I'm using Internet Explorer (iexplore.exe)

Code: Select all

ProcessExists>iexplore.exe,IEExists
If>IEExists=True
//Program (Internet Explorer) is running
'Your code here

Else
//Program (Internet Explorer) is not running
'Your code here

Endif
This example checks if the window of the specified program exists. Again, I'm using Internet Explorer in this example.

Code: Select all

IfWindowOpen> - Windows Internet Explorer*
//Program (Internet Explorer) is running
'Your code here

Else
//Program (Internet Explorer) is not running
'Your code here

Endif
I hope these examples point you in the right direction.

RykerS
Newbie
Posts: 4
Joined: Mon Jan 02, 2012 6:07 pm

Post by RykerS » Fri Jun 01, 2012 6:44 pm

Thanks Rain,

That's exactly what I was looking for! My was that a simple solution.. :oops:

:) lol

Thanks Again

-Ryker
Ryker S.

User avatar
Rain
Automation Wizard
Posts: 550
Joined: Tue Aug 09, 2005 5:02 pm
Contact:

Post by Rain » Fri Jun 01, 2012 6:57 pm

You're welcome. Glad I could help.

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