Jump to content

Recommended Posts

Posted

I am trying to launch a program by using AutoIt. Here is the code from the batch file

"C:\Program Files\Autodesk\ACADM 2008\acad.exe" /p "C:\ACAD Configuration\CKProfile.arg" %1 %2 %3 %4

Anyone knows how to make it work with AutoIt?

Posted

Thanks!

The Message I have from the program (AutoCAD) is:

Cannot find the spefified drawing file. Please verify that the file exists.

Posted

Thanks.

The arguments %1 %2 %3 %4 is something needed by the Data Management software here. When I use the batch file to launch AutoCAD, it works fine. But ... Just cannot figure out how I can make it work with AutoIt. Is there anyway I can send/receive the arguement?

Posted (edited)

You would, of course, replace "%1 %2 %3 %4" with actual parameters:

$sExtCmd = 'C:\Program Files\Autodesk\ACADM 2008\acad.exe'
$sParam1 = '"My New Drawing Name"'
$sParam2 = '/p "C:\MyDrawings\ACADProfile.arg"'
$sParam3 = '/s "C:\Lisp;C:\VBA"'
$sParam4 = '/t "C:\MyDrawings\MyTemplate.dwt"'
$sParam5 = '/nologo'
$sAllParams = $sParam1 & ' ' & $sParam2 & ' ' & $sParam3 & ' ' & $sParam4 & ' ' & $sParam5
ShellExecuteWait($sExtCmd, $sAllParams)

:idea:

Edit: Way too slow today! :)

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