piratao2 Posted May 16, 2009 Share Posted May 16, 2009 I managed to build my CHM help file with Help Maker. Now I wanted to be able to assign diferent help topics depending on the current control in focus on my GUI when the user presses F1. Is it possible? Thanks in advance. Link to comment Share on other sites More sharing options...
martin Posted May 16, 2009 Share Posted May 16, 2009 I managed to build my CHM help file with Help Maker.Now I wanted to be able to assign diferent help topics depending on the current control in focus on my GUI when the user presses F1. Is it possible?Thanks in advance.As far as knowing what control has focus you can use ControlGetFocus, then pass that as a parameter, although I don't know anything about Help Maker. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
BrettF Posted May 16, 2009 Share Posted May 16, 2009 You need to set the hotkey.In the function you should,Check if the window (your GUI) is active). If yes, proceed.Get the current focused control.Run the helpfile with Command Line paramaters. More info can be found here.Cheers,Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
piratao2 Posted May 16, 2009 Author Share Posted May 16, 2009 (edited) Thanks guys... hurry now, but will take a look on the link that BrettF has provided. The main difficulty to me is how to "Run the helpfile with Command Line paramaters". Thanks! Edited May 16, 2009 by piratao2 Link to comment Share on other sites More sharing options...
Valuater Posted May 16, 2009 Share Posted May 16, 2009 (edited) This and much =more is available in Autoit Wrappers; Open help file / Open a desired page ; Author - gafrost $sAutoItPath = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\AutoIt v3\AutoIt", "InstallDir") Run(@WindowsDir & "\HH.exe " & $sAutoItPath & "\AutoIt3.chm::/html/functions/GUICtrlCreateUpdown.htm")8) Edited May 16, 2009 by Valuater Link to comment Share on other sites More sharing options...
Yashied Posted May 17, 2009 Share Posted May 17, 2009 #include <GUIConstantsEx.au3> #include <Misc.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> $Form = GUICreate("My GUI", 400, 400, -1, -1, BitOR($WS_CAPTION, $WS_POPUP, $WS_SYSMENU, $DS_CONTEXTHELP), $WS_EX_CONTEXTHELP) $Button = GUICtrlCreateButton("Exit", 165, 360, 70, 23) GUIRegisterMsg($WM_HELP, '_WM_HELP') GUISetState() While 1 $Msg = GUIGetMsg() Switch $Msg Case $Button, $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _WM_HELP($hWnd, $msgID, $wParam, $lParam) ; Local $tHELPINFO = DllStructCreate('uint cbSize;int iContextType;int iCtrlId;hwnd hItemHandle;int dwContextId;int X;int Y', $lParam) ; Local $tPOINT = DllStructCreate('int X;int Y') ; DllStructSetData($tPOINT, 'X', DllStructGetData($tHELPINFO, 'X')) ; DllStructSetData($tPOINT, 'Y', DllStructGetData($tHELPINFO, 'Y')) Local $tPOINT = _WinAPI_GetMousePos() Local $hHandle = _WinAPI_WindowFromPoint($tPOINT) Local $ID = _WinAPI_GetDlgCtrlID($hHandle) Switch $ID Case $Button Run('hh.exe ' & RegRead('HKLM\SOFTWARE\AutoIt v3\AutoIt', 'InstallDir') & '\AutoIt3.chm') EndSwitch EndFunc ;==>_WM_HELP My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
piratao2 Posted May 17, 2009 Author Share Posted May 17, 2009 (edited) I ended up with Yashied's suggestion but have changed it a little bit to catch the current control in focus, not the current control under the mouse pointer. The way it was originally, it was taking the ID for the control under the current mouse pointer position. The way I've changed it, it takes the current control in focus. which is more interesting. Func _WM_HELP($hWnd, $msgID, $wParam, $lParam) ; Local $tPOINT = _WinAPI_GetMousePos() Local $hHandle = _WinAPI_GetFocus() ; Local $hHandle = _WinAPI_WindowFromPoint($tPOINT) Local $ID = _WinAPI_GetDlgCtrlID($hHandle) Switch $ID Case $INP_AddGroup Run('hh.exe ' & $helpfile & "::/mainscreen.html#main1") Case $BTN_AddGroup Run('hh.exe ' & $helpfile & "::/mainscreen.html#main2") ;... case Else Run('hh.exe ' & $helpfile) EndSwitch EndFunc Hope someone else can benefit from this... Edited May 17, 2009 by piratao2 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