Jump to content
Sign in to follow this  
DaLiMan

Opening File.txt

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...