Jump to content
Sign in to follow this  

Run an external command and wait for it to finish

Recommended Posts


I was trying to figure out how to do this in a Windows batch file; but gave up trying.

I would like to execute the below command; and wait for it to terminate in memory, then, continue on with the script.

cmdow /run /hid C:\PROGRA~1\INTERN~1\iexplore.exe http://movies.netflix.com/WiHome

Ideally, I'd like to have autoit hide that window; which may reduce the complexity of the external command. However, I don't know how to do that Maybe someone where knows an nice way to do this.

Share this post

Link to post
Share on other sites

You don't need cmdow /hid to hide the ie's window, just use the flag @SW_HIDE

RunWait("C:PROGRA~1INTERN~1iexplore.exe http://movies.netflix.com/WiHome",'', @SW_HIDE)

Heroes, there is no such thing

One day I'll discover what IE.au3 has of special for so many users using it.
C'mon there'sĀ InetReadĀ and WinHTTP, way better

Share this post

Link to post
Share on other sites

While the run feature is your specific question, but it doesn't hide the browser window, only the console window created if created at all, and it's no fun! :)

If you're trying to hide the browser window ( why in the world? ), then I'd suggest this ( where the 3rd param of _IECreate() has the option to show or hide on creation ).

#include <IE.au3>
Global $go_IEObj = _IECreate("http://movies.netflix.com/WiHome", 0, 0)
Edited by SmOke_N
It added url tag to my string

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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