Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Multiple keys in HotKeySet


  • Please log in to reply
4 replies to this topic

#1 Xait

Xait

    Seeker

  • Active Members
  • 14 posts

Posted 02 January 2010 - 04:59 PM

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, 02 January 2010 - 05:03 PM.








#2 martin

martin

    ~~\o/~~~/0\=¬''~~~

  • MVPs
  • 7,321 posts

Posted 02 January 2010 - 06:08 PM

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.

#3 martin

martin

    ~~\o/~~~/0\=¬''~~~

  • MVPs
  • 7,321 posts

Posted 02 January 2010 - 06:29 PM

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.

#4 somdcomputerguy

somdcomputerguy

  • Active Members
  • PipPipPipPipPipPip
  • 2,856 posts

Posted 02 January 2010 - 06:31 PM

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

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


#5 Xait

Xait

    Seeker

  • Active Members
  • 14 posts

Posted 02 January 2010 - 08:01 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users