| View previous topic :: View next topic |
| Author |
Message |
Stultus
Joined: 15 Aug 2008 Posts: 2
|
Posted: Fri Aug 15, 2008 1:54 pm Post subject: key count and different function for one key |
|
|
Hello,
Can you please help me with one little script? Here is my situation: I want a script that counts number of clicking particular key, in this case numpadenter and when its even (0, 2, 4 ..) then the key would work as alt-A and when its odd(1, 3, 5 ..) then the key would work as alt-B
So I load the script, press numpadenter and there would be alt A then I click it again and there would be alt-B then again Alt A... Thank you for your help if any will come . Or if you don't want to help then at least show me the way where to look. I have been through the basics but this is too complicated for me as I am a newbie.. |
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1276
|
Posted: Fri Aug 15, 2008 2:30 pm Post subject: |
|
|
See the example in the SetTimer documentation for detection of single, double, and triple-presses of a hotkey. _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
HugoV
Joined: 27 May 2007 Posts: 650
|
|
| Back to top |
|
 |
Slanter
Joined: 28 May 2008 Posts: 397 Location: Minnesota, USA
|
Posted: Fri Aug 15, 2008 4:21 pm Post subject: |
|
|
Or if it's just toggling between two different keys | Code: | NumpadEnter::
If (Toggle := !Toggle)
Send !a
Else
Send !b
Return |
_________________ Unless otherwise stated, all code is untested
(\__/) This is Bunny.
(='.'=) Cut, copy, and paste bunny onto your sig.
(")_(") Help Bunny gain World Domination. |
|
| Back to top |
|
 |
Stultus
Joined: 15 Aug 2008 Posts: 2
|
Posted: Fri Aug 15, 2008 5:27 pm Post subject: |
|
|
| Thanks a lot guys. |
|
| Back to top |
|
 |
|