Jump to content

HELP FILES (CHM)


Recommended Posts

Is anyone Knows how to include a chm files with Autoit and acessing this help files with context application ?

Regards

<{POST_SNAPBACK}>

I know at least one application doing that AutoIT Scite extension.

Perhaps JdeB can give you some advice.

Link to comment
Share on other sites

  • Developers

This is the script (AutoIt3Help.au3) i use to start the AutoIt3 helpfile and try to open it on the selected WORD:

FileChangeDir(@scriptDir)  
If Not FileExists("KeyHH.exe") then FileInstall("KeyHH.exe", "KeyHH.exe",1)
If ProcessExists("KeyHH.exe") Then ProcessClose("KeyHH.exe")
Run('KeyHH.exe -AutoIt3 -#klink "' & $CmdLineRaw & '" Autoit.chm',@scriptDir,@SW_HIDE)

KeyHH.exe is a command line utility that has the option to open an helpfile in the correct Topic/Page .....

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

It would take this form:

hh.exe "C:\Program Files\AutoIt3\AutoIt.chm::/html/faq.htm"

<{POST_SNAPBACK}>

This works only when you know the exact filename in the helpfile.

This example will use the Helpfile index to find the correct page:

$KeyWord = "String" 
Run('KeyHH.exe -AutoIt3 -#klink "' & $KeyWord & '" Autoit.chm',@scriptDir,@SW_HIDE)

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Ok for the code , but for invoking the program in the main program and giving the word, have you an exemple please

Regards

<{POST_SNAPBACK}>

isn't that what this code is ?

$KeyWord = "String"
Run('KeyHH.exe -AutoIt3 -#klink "' & $KeyWord & '" Autoit.chm',@scriptDir,@SW_HIDE)
What exactly are you looking for ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Hi, I remeber seeing a function that sets a file to openw hen F1 is pressed... I can't seem to find it, so here is an untested script I wrote right in these forums... For some reason, it doesn't look like it will work because of where the HotKeySet is, but who knows, at least it will give you an idea...

If NOT FileExists("TestHelp.txt") then FileWriteLine("TestHelp.txt", "This would be a help file...")
Func _SetHelpFile($sFile)
HotKeySet("{F1}", "_SetHelpFile")
Run($sFile)
EndFunc  ;==>_SetHelpFile

_SetHelpFile("TestHelp.txt")
While 1
Sleep(1000)
WEnd

Func OnAutoItExit()
HotKeySet("{F1}")
FileDelete("TestHelp.txt")
EndFunc

And just incase that doesn't work, just do something simple like this:

HotKeySet("{F1}", "Help")
Func Help()
Run("Test.chm")
EndFunc

At least it gives you the idea IF thats what your looking for :)

EDIT: Changed FileOpen to Run()...

Edited by layer
FootbaG
Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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