stev379 Posted March 1, 2005 Share Posted March 1, 2005 Why does this fail unless I include "notepad.exe"? FAILS: Run("C:\WINDOWS\system32\Help.txt", @SystemDir) FAILS: Run(@SystemDir & "\Help.txt", @SystemDir) SUCCEEDS: Run("notepad.exe C:\WINDOWS\system32\Help.txt", @SystemDir) SUCCEEDS: Run("notepad.exe" & @SystemDir & "\Help.txt", @SystemDir) Same thing with CHM files. I wouldn't mind if I knew what to use in place of "notepad.exe" when trying to run a chm file instead of a txt file. My real concern is running the chm files. The txt files were just for testing. Any suggestions would be greatly appreciated! -Steve Link to comment Share on other sites More sharing options...
zcoacoaz Posted March 1, 2005 Share Posted March 1, 2005 (edited) i think you can attempt to run any file by typing this Run ( "run " & file-to-run ) edit: i was wrong, its Run ( @ComSpec & " /c start " & file-to-run ) example: Run ( @ComSpec & " /c start http://www.autoitscript.com", "", @SW_HIDE ) Edited March 1, 2005 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
stev379 Posted March 1, 2005 Author Share Posted March 1, 2005 That did it! Thanks! Link to comment Share on other sites More sharing options...
CyberSlug Posted March 1, 2005 Share Posted March 1, 2005 (edited) To answer you original question (why): http://www.autoitscript.com/autoit3/docs/faq.htm#6Alternative to Xenogis' answer and what goes in place of notepad.exe:Run('hh.exe "C:\Program Files\AutoIt3\AutoIt.chm"') Edited March 1, 2005 by CyberSlug 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...
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