DaLiMan Posted July 9, 2004 Share Posted July 9, 2004 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? Link to comment Share on other sites More sharing options...
ezzetabi Posted July 9, 2004 Share Posted July 9, 2004 (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 July 9, 2004 by ezzetabi Link to comment Share on other sites More sharing options...
DaLiMan Posted July 9, 2004 Author Share Posted July 9, 2004 Thanx for your help and explanation. Works like a charm! Greetings, DaLiMan Link to comment Share on other sites More sharing options...
ezzetabi Posted July 9, 2004 Share Posted July 9, 2004 You are welcome, but RTFM! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now