Jump to content
Sign in to follow this  
maxrealqnx

How to disable any hotkeyset button ?

Recommended Posts

maxrealqnx

Hi my friends, I want to ask you a question, I hope you can help me :mellow:

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 by maxrealqnx

Share this post


Link to post
Share on other sites
maxrealqnx

Hi my friends, I want to ask you a question, I hope you can help me :mellow:

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

?

Share this post


Link to post
Share on other sites
martin

?

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 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.

Share this post


Link to post
Share on other sites
maxrealqnx

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 :mellow:

Share this post


Link to post
Share on other sites
somdcomputerguy

HotKeySet("{Esc}", "captureEsc") - Assigns the ESC key to the function captureEsc

HotKeySet("{Esc}") - Cancel (or unregister) the previous assignment

From 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 keypress

HotKeySet("{Esc}", "captureEsc")

Func captureEsc()

; ... can do stuff here

HotKeySet("{Esc}")

Send("{Esc}")

HotKeySet("{Esc}", "captureEsc")

EndFunc

Edited by snowmaker
  • Like 2

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
martin

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 :mellow:

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.

Share this post


Link to post
Share on other sites
maxrealqnx

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 :lol:

I'm thank you very much my friends for your nice respond. God bless you :(

Best regards :mellow:

Edited by maxrealqnx

Share this post


Link to post
Share on other sites
somdcomputerguy

I believe blessings goto the help file..


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
lian

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.