maxrealqnx Posted March 7, 2010 Share Posted March 7, 2010 (edited) Hi my friends, I want to ask you a question, I hope you can help me How do I can cancel any hotkey button, I want to cancel the {a} button but is this possible ? Best regards HotKeySet("{a}","ing") HotKeySet("{d}","ing") HotKeySet("{e}","ing") HotKeySet("+{a}","Ext") While 1 Sleep(1000) Wend Func ing() MsgBox (0, "", "Hello!") EndFunc Func Ext() MsgBox (0, "", "Bye!") Exit EndFunc Edited March 7, 2010 by maxrealqnx Visit My Website Link to comment Share on other sites More sharing options...
maxrealqnx Posted March 7, 2010 Author Share Posted March 7, 2010 Hi my friends, I want to ask you a question, I hope you can help me How do I can cancel any hotkey button, I want to cancel the {a} button but is this possible ? Best regards $A = HotKeySet("{a}","ing") HotKeySet("{d}","ing") HotKeySet("{e}","ing") HotKeySet("+{a}","Ext") While 1 Sleep(1000) Wend Func ing() GUICtrlDelete ( $A ) MsgBox (0, "", "Hello!") EndFunc Func Ext() MsgBox (0, "", "Bye!") Exit EndFunc ? Visit My Website Link to comment Share on other sites More sharing options...
martin Posted March 7, 2010 Share Posted March 7, 2010 (edited) ?I find your post quite frightening. What sort a alien being is it that comes to our forums with a question about HotKeySet when the answer is spelled out in the help file under "HotKeySet" and then bumps his own post within a few minutes?I hope you will soon acclimatize yourself to our Earth ways.EDIT: Even more frightening than I thought; I see you are a robot! Edited March 7, 2010 by martin 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...
maxrealqnx Posted March 7, 2010 Author Share Posted March 7, 2010 I find your post quite frightening. What sort a alien being is it that comes to our forums with a question about HotKeySet when the answer is spelled out in the help file under "HotKeySet" and then bumps his own post within a few minutes?I hope you will soon acclimatize yourself to our Earth ways.EDIT: Even more frightening than I thought; I see you are a robot!Hi martin I'm so sorry, I just want to get a response, I no need to the empty words. Do you intend to respond ?Best regards Visit My Website Link to comment Share on other sites More sharing options...
somdcomputerguy Posted March 7, 2010 Share Posted March 7, 2010 (edited) HotKeySet("{Esc}", "captureEsc") - Assigns the ESC key to the function captureEscHotKeySet("{Esc}") - Cancel (or unregister) the previous assignmentFrom the help file..To Send() a key combination which will trigger a HotKeySet() event, either use ControlSend() or unregister the HotKeySet() event, otherwise, the Send() event may trigger an infinite loop.; capture and pass along a keypressHotKeySet("{Esc}", "captureEsc")Func captureEsc() ; ... can do stuff here HotKeySet("{Esc}") Send("{Esc}") HotKeySet("{Esc}", "captureEsc")EndFunc Edited March 7, 2010 by snowmaker lancebh and tbodine88 2 - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
martin Posted March 7, 2010 Share Posted March 7, 2010 Hi martin I'm so sorry, I just want to get a response, I no need to the empty words. Do you intend to respond ?Best regards But I did respond and I told you how to get the answer. Please read what the help says about the function parameter. I really do find these sort of question difficult to understand. They come up quite often but it amazes me that people are prepared to spend more time posting a question and waiting for the answer than they are prepared to spend reading the help file which would tell them much much much more quickly. This thread started hours ago, but the answer is in about the 6th line (short lines too) of the help for the function and I guess it would take a slow reader like me no more than 20 seconds to find. As you see, it irritates me. 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...
maxrealqnx Posted March 7, 2010 Author Share Posted March 7, 2010 (edited) HotKeySet("{Esc}", "captureEsc") - Assigns the ESC key to the function captureEsc HotKeySet("{Esc}") - Cancel (or unregister) the previous assignment From the help file.. Result: $A = HotKeySet("{a}","ing") HotKeySet("{d}","ing") HotKeySet("{e}","ing") HotKeySet("+{a}","Ext") While 1 Sleep(1000) Wend Func ing() HotKeySet("{d}") MsgBox (0, "", "Hello!") EndFunc Func Ext() MsgBox (0, "", "Bye!") Exit EndFunc Hi snowmaker I'm thank you very much my friends for your nice respond. God bless you Best regards Edited March 7, 2010 by maxrealqnx Visit My Website Link to comment Share on other sites More sharing options...
somdcomputerguy Posted March 7, 2010 Share Posted March 7, 2010 I believe blessings goto the help file.. - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
lian Posted May 1, 2014 Share Posted May 1, 2014 Hello, as it's nearly the same "problem" I go on with this thread. I tried to pause an Hotkey like this and it does not seem to work - the hotkey is still active #Include <Misc.au3> #include <MsgBoxConstants.au3> $dll = DllOpen("user32.dll") Global $fPaused = False HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{LEFT}", "MouseleftClick") While 1 Sleep(100) WEnd Func MouseleftClick() If $fPaused = False Then MouseClick("") Else HotKeySet("{LEFT}") EndIf EndFunc Func TogglePause() $fPaused = Not $fPaused While $fPaused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause French user - my blog: http://li.an.free.fr/blog 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