Sign in to follow this  
Followers 0
Sekhar

how to use runwait command?

6 posts in this topic

Hello Experts,

Iam trying use the following code running installables one by one.

Runwait("abc.exe")

Runwait("def.exe")

Runwait("xyz.exe")

The problem iam having here is that once i run the script ,abc.exe is executing perfectly fine.

But it is leaving a Porcess called abc.exe in Taskmanager and the Script is getting paused meaning not moving to next line and doing the def.exe execution.

Is there any way i can kill the process after first installation so that second installation starts immedately after completion of first installation. or any other best methods?

I tried this  but no luck

Runwait("abc.exe")

Processclose("abc.exe")

Runwait("def.exe")

Runwait("xyz.exe")

Any suggestion would be of great help.

Best Regards,
Sekhar

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Hi,

The RunWait function as stated in the helpfile, waits for the program to close.

If the program does not close automatically, you need to use the Run function and close it when you want using the WinWait/Send/ControlSend functions.

Br, FireFox.

Edited by FireFox

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Hi,

Iam completely new and having little knowlegde,can you explian more clear?

Thanks

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Well, the schema is the following :

1. Run the setup

2. Wait for it to finish

3. Close it

;1
Run(... ;setup path

;2
WinWait("Setup - Finished") ;your setup title (if this last changes its title when finished)
 
;3
ControlClick(... ;close button
;or
ProcessClose(... ;setup pid
Br, FireFox. Edited by FireFox
1 person likes this

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites

Thanks,

I wrote like this for the command but it did not work, It is getting stopped at the window ,you can see in the attachment

Run(D:setup.exe")

WinWait("ADW165_KIT2_SPC - InstallShield Wizard", "InstallShield Wizard Completed")

WinActivate("ADW165_KIT2_SPC - InstallShield Wizard", "InstallShield Wizard Completed")

Send("{ENTER}")

Processclose("setup.exe)

Please see the image .

post-80260-0-76906100-1370343360_thumb.j

Share this post


Link to post
Share on other sites

Use the AutoIt Window Info tool (CTRL+F6 hotkey in SciTE) and try with the ControlGetText function.

If ControlGetText( ... = "... Completed" Then

EndIf
Br, FireFox.

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

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