williamk Posted January 14, 2007 Share Posted January 14, 2007 Am a total newb with Autoit. Have managed to write a nifty autoit script that will batch covert multiple files into single pdf files. If I can get it to fully work it will literally save me hundreds of hours of work. Anyway, the first step of the script is to open the Adobe Acrobat program. I tried the following with no success: Run ("Acrobat.exe", "C:\Program Files\Adobe\Acrobat 7.0\Acrobat") I get an autoit error "Unable to execute the external program. The system cannot find the file specified." I know my file path is correct, so something must be wrong with my command syntax. What am I doing wrong? Thanks much. Link to comment Share on other sites More sharing options...
59FIFTY Posted January 14, 2007 Share Posted January 14, 2007 I dont see anything wrong with this lineRun ("Acrobat.exe", "C:\Program Files\Adobe\Acrobat 7.0\Acrobat") so I'm guessing its true what the error message says, the path is incorrect Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 14, 2007 Moderators Share Posted January 14, 2007 I dont see anything wrong with this lineRun ("Acrobat.exe", "C:\Program Files\Adobe\Acrobat 7.0\Acrobat") so I'm guessing its true what the error message says, the path is incorrect@59FIFTY ... Keep guessing... Is the Acrobat.exe in the system32 folder or is your script located in the same location as the Acrobat.exe? If not, then you'll need to provide the full path to the executable. Below is an example assuming your exe is in C:\Program Files\Adobe\Acrobat 7.0\Acrobat\ directory. Run('"' & @ProgramFilesDir & '\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe' & '"') Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Valuater Posted January 14, 2007 Share Posted January 14, 2007 ShellExecute("mypdf.pdf") should work also 8) Link to comment Share on other sites More sharing options...
59FIFTY Posted January 14, 2007 Share Posted January 14, 2007 @59FIFTY ... Keep guessing...@SmOke_N don't flip me off, it's because of an incorrect root, I.e. thats my root E:\Program Files\Adobe\Acrobat 7.0\Reader Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted January 14, 2007 Moderators Share Posted January 14, 2007 @SmOke_N don't flip me off, it's because of an incorrect root, I.e. thats my root E:\Program Files\Adobe\Acrobat 7.0\ReaderYou're right, I mis-read your post. My apologies. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
williamk Posted January 14, 2007 Author Share Posted January 14, 2007 You're right, I mis-read your post. My apologies. Thanks guys Run ("Acrobat.exe", "C:\Program Files\Adobe\Acrobat 7.0\Acrobat")Worked like a charm. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now