10-May-11
This is a very small but useful UDF library for support native API HotKey controls. This library is written similary as other AutoIt GUI libraries. For more information, see detailed descriptions of all functions inside GuiHotKey.au3.
If you need more capacity to work with hot keys, you can use HotKey and HotKeyInput UDF libraries.

Available functions
HotKey UDF Library v1.0
HotKey.zip 4.4K
556 downloadsExample
#include <GUIConstantsEx.au3> #include <GUIHotKey.au3> Global $HK, $VK $hForm = GUICreate("MyGUI", 300, 92) $hHotKey = _GUICtrlHotKey_Create($hForm, _GUICtrlHotKey_MakeKeyCode($HOTKEYF_ALT, $VK_F5), 20, 20, 260, 19) $Button = GUICtrlCreateButton('OK', 115, 54, 70, 23) GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case $Button $Code = _GUICtrlHotKey_GetHotKey($hHotKey) _GUICtrlHotKey_GetKeys($Code, $HK, $VK) MsgBox(64, "Info", "Hot key code:" & @TAB & "0x" & Hex($Code, 4) & @CR & "Key modifier flags:" & @TAB & "0x" & Hex($HK, 2) & @CR & "Virtual key code:" & @TAB & "0x" & Hex($VK, 2), 0, $hForm) EndSwitch WEnd
Edited by Yashied, 18 October 2011 - 07:47 PM.








