Jump to content
Sign in to follow this  
TriGunMaster

Use ProcessWaitClose more two at same time

Recommended Posts

TriGunMaster

i cant white script check Process 5 programs. read help from Autoit not script me want

Original script

#region 1
ProcessWaitClose("sleep1.exe")
$PID = Run("sleep1.exe")
ProcessWaitClose($PID)
ProcessClose("sleep2.exe")
ProcessClose("sleep3.exe")
ProcessClose("sleep4.exe")
ProcessClose("sleep5.exe")
MsgBox ( 4096,"Test Open","Sleep 1 Is Close")   
#endregion

#region 2
ProcessWaitClose("sleep2.exe")
$PID = Run("sleep2.exe")
ProcessWaitClose($PID)
ProcessClose("sleep1.exe")
ProcessClose("sleep3.exe")
ProcessClose("sleep4.exe")
ProcessClose("sleep5.exe")
MsgBox ( 4096,"Test Open","Sleep 2 Is Close")   
#endregion

#region 3   
ProcessWaitClose("sleep3.exe")
$PID = Run("sleep3.exe")
ProcessWaitClose($PID)
ProcessClose("sleep1.exe")
ProcessClose("sleep2.exe")
ProcessClose("sleep4.exe")
ProcessClose("sleep5.exe")
MsgBox ( 4096,"Test Open","Sleep 3 Is Close")   
#endregion

#region 4
ProcessWaitClose("sleep4.exe")
$PID = Run("sleep4.exe")
ProcessWaitClose($PID)
ProcessClose("sleep1.exe")
ProcessClose("sleep2.exe")
ProcessClose("sleep3.exe")
ProcessClose("sleep5.exe")
MsgBox ( 4096,"Test Open","Sleep 4 Is Close")   
#endregion

#region 5
ProcessWaitClose("sleep5.exe")
$PID = Run("sleep5.exe")
ProcessWaitClose($PID)
ProcessClose("sleep1.exe")
ProcessClose("sleep2.exe")
ProcessClose("sleep3.exe")
ProcessClose("sleep4.exe")
MsgBox ( 4096,"Test Open","Sleep 5 Is Close")   
#endregion

sleep.au3 compile and copy change sleep1.exe - sleep5.exe

sleep (1000000)

i want script ProcessWaitClose check process all in at same time.

want first open sleep5.exe and close process sleep5.exe from there #region 5 to work Show msg Sleep 5 Is Close

all user read post to be stumped?

iam sry in my as post

Share this post


Link to post
Share on other sites
komalo

i will just give you an idea

you can make a loop that checks for all processes using

ProcessExist , as an example

while 1

If Not ProcessExists("filename.exe") Then Exit

Sleep(10)

WEnd


[font="Palatino Linotype"][size="3"]AutoIt Script Examples :[/size][/font][font="Palatino Linotype"][size="3"]_CaptureBehindWindowGlass CMD for Windows Vista/Seven[/size][/font][left][/left][font="Palatino Linotype"][size="3"]Non AutoIt Script programs : Border Skin - Aero Glass On XP[/size][/font]

Share this post


Link to post
Share on other sites
TriGunMaster

i want program to work check all sleep1.exe - sleep5.exe at same time

if which program close in 5 program give command ProcessClose to work

Edited by TriGunMaster

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.