YoseMite Posted August 19, 2005 Posted August 19, 2005 Ey, I youse the function run() to run a program. But can I with this function also the program close? Thanks, YoseMite
BigDod Posted August 19, 2005 Posted August 19, 2005 That would depend on if the program had any command line options that closed it. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
YoseMite Posted August 19, 2005 Author Posted August 19, 2005 ;run Run("test.exe") ;sleep prog sleep("3000") ;Close("test.exe") ....
BigDod Posted August 19, 2005 Posted August 19, 2005 ;runRun("test.exe");sleep progsleep("3000");Close("test.exe")....<{POST_SNAPBACK}>How about ProcessClose("test.exe") Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
BigDod Posted August 19, 2005 Posted August 19, 2005 Try $PID = ProcessExists("notepad.exe"); Will return the PID or 0 if the process isn't found. If $PID Then ProcessClose($PID) Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
YoseMite Posted August 19, 2005 Author Posted August 19, 2005 I want actual this: $PID = ProcessExists("notepad.exe"); Will return the PID or 0 if the process isn't found. If $PID Then run("notepad.exe") Sleep("3000") ProcessClose($PID) But he doesn't close..
BigDod Posted August 19, 2005 Posted August 19, 2005 This works for me. $PID = ProcessExists("notepad.exe"); Will return the PID or 0 if the process isn't found. If $PID=0 Then run("notepad.exe") Sleep("3000") ProcessClose("notepad.exe") Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
YoseMite Posted August 19, 2005 Author Posted August 19, 2005 (edited) Hmm.. Me2 :"> Thx! Edited August 19, 2005 by YoseMite
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now