Jump to content

Recommended Posts

Posted

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

1) Launch an exe from a specified directory.

2) Maximize a window.

Thanks.

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!
Posted

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:

  • 9 months later...
Guest VanDike
Posted

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

Posted

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!

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...