YoseMite Posted August 19, 2005 Share 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 Link to comment Share on other sites More sharing options...
BigDod Posted August 19, 2005 Share 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 Link to comment Share on other sites More sharing options...
YoseMite Posted August 19, 2005 Author Share Posted August 19, 2005 ;run Run("test.exe") ;sleep prog sleep("3000") ;Close("test.exe") .... Link to comment Share on other sites More sharing options...
BigDod Posted August 19, 2005 Share 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 Link to comment Share on other sites More sharing options...
YoseMite Posted August 19, 2005 Author Share Posted August 19, 2005 Hmmz.. Doesn't work... Link to comment Share on other sites More sharing options...
BigDod Posted August 19, 2005 Share 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 Link to comment Share on other sites More sharing options...
YoseMite Posted August 19, 2005 Author Share 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.. Link to comment Share on other sites More sharing options...
BigDod Posted August 19, 2005 Share 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 Link to comment Share on other sites More sharing options...
YoseMite Posted August 19, 2005 Author Share Posted August 19, 2005 (edited) Hmm.. Me2 :"> Thx! Edited August 19, 2005 by YoseMite Link to comment Share on other sites More sharing options...
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