ProGrammar Posted February 6, 2009 Posted February 6, 2009 Hi there! I would want help with the HotKey function, i've read the commands for HotKey in the help file but im not see any code that might be possible to disable the hotkey for a minute? I would also want nearly all hotkeys (ALL EXCEPT pause and quit) i have to disable when im using the pause function! Because if i have a hotkey on button "K" and im typing to a friend then the "K" button wont work. So can someone please tell me if its possible to disable the hotkey in some way? Without close the program
KaFu Posted February 6, 2009 Posted February 6, 2009 (edited) 'function [optional] The name of the function to call when the key is pressed. Not specifying this parameter will unset a previous hotkey. ' Edited February 6, 2009 by KaFu OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
KaFu Posted February 6, 2009 Posted February 6, 2009 expandcollapse popupGlobal $hotkeysset = True HotKeySet("{PAUSE}", "TogglePause") _enablehotkeys() while 1 sleep(20) WEnd Func TogglePause() $hotkeysset = Not $hotkeysset If $hotkeysset = True Then _enablehotkeys() Else _disablehotkeys() EndIf MsgBox(0,'','Hotkeys set? ' & $hotkeysset) EndFunc ;==>TogglePause func _enablehotkeys() HotKeySet('a','_func_hotkey_a') HotKeySet('b','_func_hotkey_b') HotKeySet('c','_func_hotkey_c') EndFunc func _disablehotkeys() HotKeySet('a') HotKeySet('b') HotKeySet('c') EndFunc func _func_hotkey_a() MsgBox(0,'','a pressed') EndFunc func _func_hotkey_b() MsgBox(0,'','b pressed') EndFunc func _func_hotkey_c() MsgBox(0,'','c pressed') EndFunc OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
ProGrammar Posted February 6, 2009 Author Posted February 6, 2009 expandcollapse popupGlobal $hotkeysset = True HotKeySet("{PAUSE}", "TogglePause") _enablehotkeys() while 1 sleep(20) WEnd Func TogglePause() $hotkeysset = Not $hotkeysset If $hotkeysset = True Then _enablehotkeys() Else _disablehotkeys() EndIf MsgBox(0,'','Hotkeys set? ' & $hotkeysset) EndFunc ;==>TogglePause func _enablehotkeys() HotKeySet('a','_func_hotkey_a') HotKeySet('b','_func_hotkey_b') HotKeySet('c','_func_hotkey_c') EndFunc func _disablehotkeys() HotKeySet('a') HotKeySet('b') HotKeySet('c') EndFunc func _func_hotkey_a() MsgBox(0,'','a pressed') EndFunc func _func_hotkey_b() MsgBox(0,'','b pressed') EndFunc func _func_hotkey_c() MsgBox(0,'','c pressed') EndFunc Aaah, okey! Thanks
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