Sign in to follow this  
Followers 0
bsmith0183

Whats Wrong with this code??????

3 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0