onestcoder Posted March 7, 2006 Share Posted March 7, 2006 What I want to do is when a user clicks to read my Read Me file from my Gui it opens the readme.txt file in Notepad.exeIn the help files I see this:Which is the first step to understanding how to do it.Run("Notepad.exe", "", @SW_MAXIMIZE)I have also read this post:Launching a pdf file from a script, Launching a pdf file from a scripthttp://www.autoitscript.com/forum/index.ph...hl=@SW_MAXIMIZEWhich shows meRun("explorer.exe " & @ScriptDir & "\Documentation\Help.pdf", "", @SW_MAXIMIZE)Here is what I have mod it toRun("Notepad.exe " & @ScriptDir & "\include\readme.txt", "", @SW_MAXIMIZE)But its not working for me. Is there something I'm missing??? Need a website: http://www.iconixmarketing.com Link to comment Share on other sites More sharing options...
CyberSlug Posted March 7, 2006 Share Posted March 7, 2006 works for me.... Sometimes you need extra quotes when the file path contains spaces, but it works either way for me. $path = @ScriptDir & "\include\readme.txt" ;Debug MsgBox(0,"Path", $path) If Not FileExists($path) Then MsgBox(0,"error","File not found") ;Try one Run("Notepad.exe " & $path, "", @SW_MAXIMIZE) ;Second try Run("Notepad.exe " & """" & $path & """", "", @SW_MAXIMIZE) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Valuater Posted March 7, 2006 Share Posted March 7, 2006 i have found when the path has spaces...; $Path = FileGetShortName( ACTUAL PATH ) Run("Prog.exe " & $path, "", @SW_MAXIMIZE) works everytime 8) 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