Sign in to follow this  
Followers 0
Jmjl

2 Questions...

6 posts in this topic

I have 2 questions... I would like to know how to:

1) Launch an exe from a specified directory.

2) Maximize a window.

Thanks.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

See the help file for Run and WinShow

Run ( "filename" [, "workingdir" [, flag]] )

Run("C:\some folder\another folder\program.exe")

Run("program.exe", "C:\some folder\another folder\", @SW_MAXIMIZE)

WinShow ( "title", "text", flag )

WinShow("Untitled - Notepad", "", @SW_MAXIMIZE)

Hope that helps

Edited by CyberSlug

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

The Run function may be used to launch an application:

Run("C:\MyStuff\SomeFile.exe")

The Winshow function may be used to show/hide existing windows:

WinShow("Untitled - Notepad", "", @SW_MINIMIZE)

The Help file covers additional options which may be used for both of these functions. :whistle:

Share this post


Link to post
Share on other sites

Ack, I see that CyberSlug beat me to the response. :whistle:

Share this post


Link to post
Share on other sites

What to do if @SW_MAXIMIZE does not maximize the window in this script?

RunWait ("explorer http://www.hotmail.com","", @SW_MAXIMIZE)

IE always opens in Window mode...

Share this post


Link to post
Share on other sites

What to do if @SW_MAXIMIZE does not maximize the window in this script?

....

IE always opens in Window mode...

<{POST_SNAPBACK}>

Explorer launches the window Internet Explorer. You need to @SW_MAXIMIZE the Internet Explorer window not "explorer." Just call IE directly:

RunWait(@ProgramFilesDir & "\Internet Explorer\iexplore.exe " & "http://www.hotmail.com","", @SW_MAXIMIZE)


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

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