Jump to content

Dumb Question regarding the Run Command


Guest themav54
 Share

Recommended Posts

Guest themav54

Hi,

I am trying to open outlook through autoit and it doesn't seem to be working. This is my script file:

Run("outlook.exe", "C:\Program Files\Microsoft Office\Office", @SW_MAXIMIZE)

It says that it cannot find the file specified. Outlook.exe is in that directory. What am I missing? Thanks.

Link to comment
Share on other sites

Guest themav54

Never mind - I realized that the script file must in the same folder as outlook. Thanks.

Hi,

I am trying to open outlook through autoit and it doesn't seem to be working.  This is my script file:

Run("outlook.exe", "C:\Program Files\Microsoft Office\Office", @SW_MAXIMIZE)

It says that it cannot find the file specified.  Outlook.exe is in that directory.  What am I missing?  Thanks.

<{POST_SNAPBACK}>

Link to comment
Share on other sites

[rant]

Jon, CyberSlug, or anybody else for that matter, could you please, please, please explicitly state in the help file that the "filename" parameter must be a full path. For some reason, everybody just assumes the working directory means path to file, even though its an optional parameter. If it was the path to the file, people, why would it be optional?

[/rant]

PS: Jon, you should modify the forum to do something with the [rant] tag :ph34r:

Link to comment
Share on other sites

There are 3 types of programmers/scripters:

Those who think outside the box.

Those who think inside the box.

Those who can't find the box.

-- Me (As far as I know)

@Valik

Just wanted to let you know your sig is coo.

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

@Lar

Run("outlook.exe", @SW_MAXIMIZE)

;Would not work, outlook has no path that the system knows?

Run("C:\Program Files\Microsoft Office\Office\outlook.exe", @SW_MAXIMIZE)

;Would may work so long as it can see within it's own working directory?

Run("outlook.exe", "C:\Program Files\Microsoft Office\Office", @SW_MAXIMIZE)

;Would not work, outlook has no path that the system knows?

Run("C:\Program Files\Microsoft Office\Office\outlook.exe", C:\Program Files\Microsoft Office\Office", @SW_MAXIMIZE)

;This Does work as is giving the system the path to the executable and the executable knows it's working path?

This is same as making shortcuts, basic commands etc. No bug in Autoit. Nor needing @comspec?

I think that general knowledge has been overlooked here? Do you agree?

Last example works as it can see within it's own working directory. :ph34r:

Link to comment
Share on other sites

[rant]

Jon, CyberSlug, or anybody else for that matter, could you please, please, please explicitly state in the help file that the "filename" parameter must be a full path.  For some reason, everybody just assumes the working directory means path to file, even though its an optional parameter.  If it was the path to the file, people, why would it be optional?

[/rant]

Yeah, that should be made clear for the Run and RunWait functions..... Anyone have an idea how to also explain the concept of a working directory in one or two sentences?
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Yeah, that should be made clear for the Run and RunWait functions.....  Anyone have an idea how to also explain the concept of a working directory in one or two sentences?

<{POST_SNAPBACK}>

Does it have to be polite...? :(:ph34r:
Link to comment
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
 Share

  • Recently Browsing   0 members

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