Jump to content

Whats Wrong with this code??????


bsmith0183
 Share

Recommended Posts

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...