Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Printing the character from ascii code
#1
I am capturing a keystroke during a 'wait' and need to build a 'sel' statement out of the key pressed.
here's what I'm doing.
What I'd like to do is if a handful of keys are pressed do one thing if any others are pressed go ahead and press that key then end macro. what command am I missing here?
Macro Macro2
Code:
Copy      Help
int i = wait(0 KF)
out i
sel i
,case 32, 66,
,,out "case1"
,case else
,,_s=(i)
,,out _s
,,key(i)
An old blog on QM coding and automation.

The Macro Hook
#2
1. your code waits 66 s if key 32 pressed.
2. must be key (i)

Macro Macro1728
Code:
Copy      Help
int i = wait(0 KF)
out i
sel i
,case [32, 66]
,,out "case1"
,case else
,,FormatKeyString i 0 &_s
,,out _s
,,key (i)
#3
thanks!
An old blog on QM coding and automation.

The Macro Hook


Forum Jump:


Users browsing this thread: 1 Guest(s)