rasim Posted April 3, 2008 Share Posted April 3, 2008 Hi!I try to use HTML help for my script, but unsuccessful #include <GuiConstants.au3> #include <WinAPI.au3> Global Const $HH_DISPLAY_TOPIC = 0x0 Global Const $HH_HELP_CONTEXT = 0xF Global Const $HH_CLOSE_ALL = 0x12 Global $DllRet $hGUI = GUICreate("Test GUI", 200, 100, -1, -1, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU), $WS_EX_CONTEXTHELP) $HelpButton = GUICtrlCreateButton("Help", 65, 40, 60, 25) GUISetState() While 1 Switch GUIGetMsg() Case -3 ExitLoop Case $HelpButton $DllRet = DllCall("HHCtrl.ocx", "hwnd", "HtmlHelp", "hwnd", $hGUI, "str", @ScriptDir & "\test.chm", _ "int", $HH_DISPLAY_TOPIC, "long", "Default.htm") $DllRet = $DllRet[0] ConsoleWrite($DllRet & @LF) EndSwitch WEnd DllCall("HHctrl.ocx", "hwnd", "HtmlHelp", "hwnd", $DllRet, "str", @ScriptDir & "\test.chm", "int", $HH_CLOSE_ALL, "int", 0)Referencetest.zip Link to comment Share on other sites More sharing options...
DarkMatter Posted April 3, 2008 Share Posted April 3, 2008 (edited) I believe the problem is in the dwData section of the DllCall. MSDN says: Specifies additional data depending on the value of uCommand. Note that in this declaration this argument is declared As Any, because this argument accepts several different data types. You must be careful to pass the correct data type or risk an invalid page fault (also known as general protection fault [GPF]). As long as you are not wanting to jump to diffrent topics within the help file you could alternately use ShellExecute(@ScriptDir & "\test.chm") Edited April 3, 2008 by DarkMatter [sub]Quantum mechanics: The dreams stuff is made of[/sub] Link to comment Share on other sites More sharing options...
rasim Posted April 4, 2008 Author Share Posted April 4, 2008 Anyone? I not believe that this impossible in AutoIt. 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