Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Creating key wait macro
Dear Sir,

Can you help me how to create a macro which WAITS for any key from a to z or 0 to 9 (only alphabet and numeric only) and when key is pressed it gives BEE sound
if BACKSPACE or other special key pressed then it does not do any thing. Please let me know. I am licence user.

Mohnish Patel
Search this forum for SetWindowsHookEx and WH_KEYBOARD_LL.
this should be what you need
Function Function122
Copy      Help
int vk = wait(0 KF)
if((vk>47 and vk<59) or (vk>64 and vk<91) or (vk>96 and vk<123))
,out vk
,Beep 600 1000

on another note is bee not working still couldn't make it work so i used beep instead
In QM 2.3.4 beta there was a bug when using bee like 'bee 600 1000'. Fixed now. But 'Beep 600 1000' is exactly the same.
Thanks for help.
Actually What I need is there is a textbox on a webpage, when that webpage loads my quick macro puts cursor to the text box , but after I need macro to press ENTER key when I type 5 letters in that text box, those 5 letters can be any thing from from a to z and 0 to 9. If i make a mistake in typing then i will press BACKSPACE so I dont want to count BACKSPACE in 5 letters.
So I need a macro to WAIT for 5 keys to press and key should be only alphabets and numerics.
Let me know.
sorry for the delay got busy for a few minutes try this
Function WaitForKeys0_9a_z
Copy      Help
int x
,int vk = wait(0 K);;wait for any key press
,if(vk=8);;if backspace key remove 1 from total count
,,if x<0;;if x goes below 0 reset x to 0
,,out x
,if((vk>47 and vk<59) or (vk>64 and vk<91) or (vk>96 and vk<123));;if key 0-9 or a-z is pressed
,,out vk
,,out x
,,if x=5
,,,Beep 600 1000
as far as the web page what Qm function you will use depends on your browser
This is Excellent support. I appreciate very much. Best support I have ever seen.
Just a query - on how many PC on my local area network can I use the same key for registration?

oops made a typo in the function(was short 1 number in vk<122) It has been corrected above.
You can use the same reg code on max 5 personal (not company) computers. You and your family members can use Quick Macros on these computers.

If it is a company, need separate reg code for each computer where Quick Macros is used.

Forum Jump:

Users browsing this thread: 1 Guest(s)