Jump to content

this right ?Run("Notepad.exe", "\help.txt", @SW_MA


Recommended Posts

Won't work gives error can't find it ?

Run("Notepad.exe", "\help.txt", @SW_MAXIMIZE)

help.txt is in the same folder as the progam /au3

---------------------------

AutoIt Error

---------------------------

Line 123  (File "E:\Programs\AutoIt3\Examples\English\5_24\new small notes\small note8.au3"):

Run("Notepad.exe", "\help.txt", @SW_MAXIMIZE)

Error: Unable to execute the external program.

The directory name is invalid.

Link to comment
Share on other sites

---------------------------

AutoIt Error

---------------------------

Line 123 (File "E:\Programs\AutoIt3\Examples\English\5_24\new small notes\small note8.au3"):

Run("Notepad.exe", "help.txt", @SW_MAXIMIZE)

Error: Unable to execute the external program.

The directory name is invalid.

```````````````````````````

What now ?

Link to comment
Share on other sites

oh ok, so here.. now pay attention

Run("notepad.exe"& @ProgramFilesDir & "\AutoIt3\help.txt",@WindowsDir,@SW_MAXIMIZE)

Run ( "filename" [, "workingdir" [, flag]] )

the file that you wish to open with notepad.exe has to follow notepad.exe with the path name and file for notepad to open. this all has to be done before the working directory of notepad....

if any questions tell me the path to the text file and i will give you a working example ok...

Edited by beerman
Link to comment
Share on other sites

But I have no idea where they would install this if i gave it to someone would I . so I need it to open from the folder that main exe is in as the help.txt would be in the same folder it is in .

Link to comment
Share on other sites

did you know moving the help.txt to even c:\ and trying this won't even work Run("notepad.exe"&"c:\help.txt",@WindowsDir,@SW_MAXIMIZE) and oh before you even ask i tried all this with the run dialog first and it runs just fine from there

Edited by beerman
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...