Sign in to follow this  
Followers 0
Dethredic

Basic Help NOOB HERE

3 posts in this topic

hi

i want to run a program then see if another program is running if is is do nothing else exit te program

Example

**(MS Paint is already running)**

Run ("C:\Windows\system32\notepad.exe")

IF (MS Paint) is open do nothing else exit Notepad

i also want

**IF MS Paint is open do nothing else exit Notepad** to be repeated over and over so the second Paint is quit notepad will

**paint and notepad aarn't the programs i am really gonna use**

thanks


"Its not about the 30 inch 1080p display, or the SLI 8800 ultras, or the DDR3 memory. It's about when you turn on your PC, does it return the favor?"Math is like sex. Sure, it may give some practical results, but that is not why we do it

Share this post


Link to post
Share on other sites



Looks like you have to do some homework and RTFM :P

After you have done that you will end up with somthing like this (taken from the top of my head, not tested)

Local $pid = Run("notepad")
While WinExists("aint") ; Looking for a window containing aint in it. Loop if it exists.
    Sleep(5)
Wend
Kill($pid) ;Terminate notepad
Exit ;Terminates this program, realy not needed at this point but ...

Share this post


Link to post
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
Sign in to follow this  
Followers 0