Jump to content

Recommended Posts

Posted

I am probably missing something obvious here (I am relatively new to AutoIT), but I am having trouble with the RUN command. It seems to work for some programs and not others with no error message.

Example:

This works:

Run("C:\Program Files\Microsoft Office\Office10\excel.exe")

But this does not:

Run("C:\Program Files\HQuote\hquote.exe")

I double checked the path by pasting C:\Program Files\HQuote\hquote.exe into the Start --> Run and it worked...what am I doing wrong?

Thanks

Posted

I am probably missing something obvious here (I am relatively new to AutoIT), but I am having trouble with the RUN command. It seems to work for some programs and not others with no error message.

Example:

This works:

Run("C:\Program Files\Microsoft Office\Office10\excel.exe")

But this does not:

Run("C:\Program Files\HQuote\hquote.exe")

I double checked the path by pasting C:\Program Files\HQuote\hquote.exe into the Start --> Run and it worked...what am I doing wrong?

Thanks

Try giving it a valid Temp directory:

Run("C:\Program Files\HQuote\hquote.exe", @TempDir, @SW_SHOW)

:P

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

run seems to do this to me sometimes and i do this

$file = "C:\Program Files\HQuote\hquote.exe"

if fileexists($file) then

$nfile = filegetshortname($file)

Run($nfile,"", @SW_SHOW)

endif

****** not tested

8)

NEWHeader1.png

Posted

run seems to do this to me sometimes and i do this

$file = "C:\Program Files\HQuote\hquote.exe"

if fileexists($file) then

$nfile = filegetshortname($file)

Run($nfile,"", @SW_SHOW)

endif

****** not tested

8)

I just tried your suggestion (thank you, by the way) and it's strange. The if loop executes (I know b/c I inserted some other commands inside the loop), which should mean the file exists, but the .exe still didn't run...

Posted

I just tried your suggestion (thank you, by the way) and it's strange. The if loop executes (I know b/c I inserted some other commands inside the loop), which should mean the file exists, but the .exe still didn't run...

maybe its looking for some file in its directory... try this

Run($nfile, "C:\Program Files\HQuote\", @SW_SHOW)

8)

NEWHeader1.png

Posted (edited)

I've had problems like this before as well. Try setting the "workingdir"-parameter to the

same folder as the program-file is located in. That solved my problem at least..

Run("C:\Program Files\HQuote\hquote.exe", "C:\Program Files\HQuote\")

Edit :crap

Edited by Helge

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