Champak Posted May 17, 2006 Share Posted May 17, 2006 I'm unable to run a prgram. I've never used these files before so I don't know the root exe file to run it, I'm assuming the file itself is the exe file. It is in a compiled HTML help format. What I'm using to launch it is... Run("NAM.chm") When I check to see what it opens with, I see "Microsoft HTML Help Executable". But what and where is that on an XP system? Is there a root exe file I should be calling with it? If so, what is the program that is actually used to launch it? ....I hope I'm making sense Link to comment Share on other sites More sharing options...
jezzzzy Posted May 17, 2006 Share Posted May 17, 2006 You can't do it quite like that. Try this: Run(@COMSPEC & ' /c "c:\your path\NAM.chm"','',@sw_hide) Link to comment Share on other sites More sharing options...
BigDod Posted May 17, 2006 Share Posted May 17, 2006 Try #include <Process.au3> $rc = _RunDos("start NAM.chm") Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
MHz Posted May 17, 2006 Share Posted May 17, 2006 Run('hh.exe NAM.chm') Link to comment Share on other sites More sharing options...
Champak Posted May 17, 2006 Author Share Posted May 17, 2006 Thanks all. I went with door number 3 because a lot of my other code is done like that. I'm always a little skeptical/wary when there are multiple ways to code something. Is there a reason for the other ways...proper coding....redundancys or something. Link to comment Share on other sites More sharing options...
JoshDB Posted May 17, 2006 Share Posted May 17, 2006 hh.exe is something used by AutoIt to launch helpfiles, I think the hh stands for Helpfile Handler/Helper, or something like that. Basically all the hh.exe does is what the prior two gents gave, except it accepts a parameter on launch for ease of use. Ha, I haven't been on these forums since... 2006, almost. Behold, my legacy signature:My AutoIt idol is Valuater. You know you love him, too.My Stuff: D&D AGoT Tools Suite Link to comment Share on other sites More sharing options...
SyntaxError Posted June 26, 2006 Share Posted June 26, 2006 I didn't want to start a new thread for an old issue so I posted here. After extensive searching and trying all the examples I found, I still can't open a .chm file from an AutoIt script, unless I hardcode the path, but I need to use an environment variable in place of hardcoding the path to the .chm file. If I type "hh.exe %CD%\App\pk.chm" from a cmd window, it works fine, but if called from a script, I get an error saying it can't find the path. I've also tried the following, which also does not work (same error). $help = @ScriptDir & "\App\pk.chm" Run("hh.exe $help") This is for a portable app so I don't want to use any 3rd party tools and I really don't want to resort to using a batch file and calling it from the script. Does anyone know how to solve this? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 26, 2006 Moderators Share Posted June 26, 2006 $help = @ScriptDir & "\App\pk.chm" Run("hh.exe " & '"' & $help & '"') Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
SyntaxError Posted June 26, 2006 Share Posted June 26, 2006 Thank you very much. It works great. Now that I see it, I'm kicking myself. Link to comment Share on other sites More sharing options...
AutoItKing Posted June 26, 2006 Share Posted June 26, 2006 (edited) Simple UDF: Func _OpenHelp($file) Run("hh.exe " & '"' & $file & '"') EndFunc Three liner! Edited June 26, 2006 by AutoItKing http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] Link to comment Share on other sites More sharing options...
Valik Posted June 26, 2006 Share Posted June 26, 2006 Simple UDF: Func _OpenHelp($file) Run('hh.exe' & $file) EndFunc Three liner!In your mad rush to write a "three liner" you forgot the most important part, making sure it works. Link to comment Share on other sites More sharing options...
AutoItKing Posted June 26, 2006 Share Posted June 26, 2006 I fixed it. http://www.autoitking.co.nr Site is DOWN | My deviantART | No Topic Topic - Don't do it!-------------------- UDF's/Scripts:AutoIt: [BenEditor 3.6] [_ShutDown()]PHP: [CommentScript]Web Based AutoIt: [MemStats] [HTML to AU3] [User LogIn and SignUp script] 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