Sign in to follow this  
Followers 0

Multiple keys in HotKeySet

5 posts in this topic

#1 ·  Posted (edited)

Hi.

What format should I use to allow me to add more than one button into a hotkey? I have tried:

HotKeySet("{RCTRL}m", Double_Click")

HotKeySet("{RCTRL}""m", Double_Click")

HotKeySet("{RCTRL}+m", Double_Click")

HotKeySet("{RCTRL}"+"m", Double_Click")

I just can't work it out. Is it even possible to add control into it (I tried reading the help file for that part but I just couldn't make sense of it.)

Thanks, Wez

Edited by Xait

Share this post


Link to post
Share on other sites



#2 ·  Posted

Hi.

What format should I use to allow me to add more than one button into a hotkey? I have tried:

HotKeySet("{RCTRL}m", Double_Click")

HotKeySet("{RCTRL}""m", Double_Click")

HotKeySet("{RCTRL}+m", Double_Click")

HotKeySet("{RCTRL}"+"m", Double_Click")

I just can't work it out. Is it even possible to add control into it (I tried reading the help file for that part but I just couldn't make sense of it.)

Thanks, Wez

To have a hotkey sequence which uses modifier keys you have to use a special symbol as described in the help to indicate the modifier key to be used. You cannot use the code for the actual modifier key, ie the code you would use in Send.

So Ctrl m would be

HotKeySet("^m","DoubleClick")

Note that the function name must be given as a string. Tagging a quotation mark at the end of the function name is random daftness or a trypo.

If you only want to respond when the right ctrl is pressed then I think the way to do it might be like this

Func DoubleClick()
 If Not _IsPressed("A3") then return;the right Ctrl key is not pressed (needs #include <misc.au3>)
 ;carry on with whatever

EndFunc

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

#3 ·  Posted

I believe this would work for Right Control Shift m

HotKeySet("{RCTRL}+m", "Double_Click")

snowmaker, stand in the corner for 2 hours and contemplate the validity of your beliefs.

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

#4 ·  Posted

The idiot in me for some reason posted before testing.. I'll be in a corner..


- Bruce [font="'Lucida Console';"]/*somdcomputerguy */  If you change the way you look at things, the things you look at change.[/font]

Share this post


Link to post
Share on other sites

#5 ·  Posted

Thanks people.

That mistake was a typo (I was too far to reach over to the other screen and copy+ paste so i wrote it again - wrong)

Thanks again, Wez

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  
Followers 0