Jump to content

Recommended Posts

Posted

I can't open my file, I tried the HELP file and some code like this but nothing opens my .txt file

Run("C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt", "", @SW_MAXIMIZE)

Run("Notepad.exe", "C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt", @SW_MAXIMIZE)

RunWait(@ComSpec & " /c " & 'C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt', "", @SW_HIDE)

Can anyone help me with this one?

Posted (edited)

Run("C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt", "", @SW_MAXIMIZE)

The .txt files are not executables. So this cant work.

Run("Notepad.exe", "C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt", @SW_MAXIMIZE)

In this case you are trying to open Notepad from the C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt FOLDER!

Of course it cant work...

RunWait(@ComSpec & " /c " & 'C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt', "", @SW_HIDE)

See, first one.

Correct:

Run('notepad "C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt"', "", @SW_MAXIMIZE)

;The same of other.

RunWait(@ComSpec & ' /c start "" ' & '"C:\Documents and Settings\Default User\Local Settings\Temp\ArtNRFail.txt"', "", @SW_HIDE)

If you are using a Win9x kernel system remove the two "s near "start"

Edited by ezzetabi

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
×
×
  • Create New...