Jump to content

Recommended Posts

Posted

Hello All,

I have a script that I'm trying to call a .BAT file from

Run("file_compare.bat", "c:\program files\program name\root dir")

The help says to use a file name then the working directory, which is what I'm doing.

I have downloaded the latest release of AutoIt

For what it's worth, the .BAT runs ImageMagick and compares a directory full of images. I can get the .BAT file to run from the CMD window or double clicking on the file in the directory.

Any ideas why this wouldn't be working?

Thanks

Cygnus

Cygnus

Posted (edited)

You may need to path out the executable:

$sDir = "c:\program files\program name\root dir"
$sFile = "file_compare.bat"
Run($sDir & "\" & $sFile, $sDir, @SW_SHOW)

:)

Edit: Well that's what I get for not checking on replies already posted:

Thank you, ShellExecute worked!

ShellExecute("file_compare", "", "C:\Program Files\program name\root dir")

Cygnus

:P Edited by PsaltyDS
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

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
×
×
  • Create New...