Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

how? while key1, key2/key3 to in/decrement, key1 Up applies


  • Please log in to reply
3 replies to this topic
BETLOG
  • Members
  • 222 posts
  • Last active: Apr 07 2010 01:58 PM
  • Joined: 27 Nov 2006
I can see several ways to approach this, but as i start coding each it seems wrong or overly complex:

I need to do this:
I Hold down Key1
While Key1 is held either:
Key2 is pressed to increment a counter
Key3 is pressed to decrement a counter
When Key1 is released the counter number is actioned.

Can someone point me in the right direction please?

engunneer
  • Moderators
  • 9162 posts
  • Last active: Sep 12 2014 10:36 PM
  • Joined: 30 Aug 2005
Check out the help file under Hotkeys - subsection called "Custom Combinations and Other Features [Windows NT/2000/XP or later]"

you will end up writing something like
key1 & key2::counter++
key1 & key3::counter--


there is likely more you will need to do, but the help file will tell you what you need

jonny
  • Members
  • 2951 posts
  • Last active: Feb 24 2008 04:22 AM
  • Joined: 13 Nov 2004
Hotkey,2,Off

Hotkey,3,Off

Counter=0

return



1::

Hotkey,2,On

Hotkey,3,On

KeyWait 1

Hotkey,2,Off

Hotkey,3,Off

MsgBox % Counter

Counter=0

return



2::Counter++

3::Counter--


BETLOG
  • Members
  • 222 posts
  • Last active: Apr 07 2010 01:58 PM
  • Joined: 27 Nov 2006
Thanks engunneer.. jonny. That's much more elegant than what I had been trying...similar but much cleaner.