bsmith0183 Posted September 27, 2010 Share Posted September 27, 2010 Hi I have a special EXE File created to launch a PDF I am trying to figure out whats wrong with this code????? Here is the code Original Code before I put in my PDF Filename Here is Visual C++ example code: ShellExecuteA (NULL, "open", "ReadPFile.exe", cFileName, NULL, SW_SHOWNORMAL After putting in my PDF Filename ShellExecuteA ( "open", "ReadPFile.exe", lawson.pdf, NULL, SW_SHOWNORMAL); Is this Right????? I am ultimately trying to make an EXE that will launch the ReadPFile.exe which in turn will launch the lawson.pdf file The ReadPFile.exe and the Lawson.pdf do exist in the same folder and I drop in the EXE created by auto it but it does not launch the readpfile.exe at all Any help would be great..... Thanks Link to comment Share on other sites More sharing options...
the kick inside Posted September 27, 2010 Share Posted September 27, 2010 from the help file ShellExecute ( "filename" [, "parameters" [, "workingdir" [, "verb" [, showflag]]]] ) so in your example something more like ShellExecute ( "readpdf.exe" , "anotherfile.pdf") might be a place to start Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 27, 2010 Share Posted September 27, 2010 Also, "NULL" is not a valid keyword in AutoIt, and the macro @SW_SHOWNORMAL requires the "@". To expand the previous example you were given: ShellExecute("readpdf.exe", "anotherfile.pdf", @WorkingDir, "Open", @SW_SHOWNORMAL) Depending on the environment, you might have to provide a full path to at least the target file. 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 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