Sign in to follow this  
Followers 0
YoseMite

Run()

9 posts in this topic

Ey,

I youse the function run() to run a program.

But can I with this function also the program close?

Thanks,

YoseMite

Share this post


Link to post
Share on other sites



That would depend on if the program had any command line options that closed it.



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

;run

Run("test.exe")

;sleep prog

sleep("3000")

;Close("test.exe")

....

Share this post


Link to post
Share on other sites

;run

Run("test.exe")

;sleep prog

sleep("3000")

;Close("test.exe")

....

<{POST_SNAPBACK}>

How about ProcessClose("test.exe")


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

Hmmz..

Doesn't work... :whistle:

Share this post


Link to post
Share on other sites

Try

$PID = ProcessExists("notepad.exe"); Will return the PID or 0 if the process isn't found.
If $PID Then ProcessClose($PID)


Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

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..

Share this post


Link to post
Share on other sites

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")

:whistle::dance::dance:



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

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

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Hmm.. Me2 :">

Thx!

Edited by YoseMite

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