Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

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
  • 1 month later...
Posted

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?

  • Moderators
Posted

$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.

Posted (edited)

Simple UDF:

Func _OpenHelp($file)
       Run("hh.exe " & '"' & $file & '"')
EndFunc

Three liner!

Edited 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]
Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...