Posts: 17
Threads: 3
Joined: Feb 2013
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
Posts: 12,092
Threads: 142
Joined: Dec 2002
Search this forum for SetWindowsHookEx and WH_KEYBOARD_LL.
Posts: 1,338
Threads: 61
Joined: Jul 2006
this should be what you need
Function
Function122
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
Posts: 12,092
Threads: 142
Joined: Dec 2002
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.
Posts: 17
Threads: 3
Joined: Feb 2013
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.
Posts: 1,338
Threads: 61
Joined: Jul 2006
sorry for the delay got busy for a few minutes try this
Function
WaitForKeys0_9a_z
int x
rep
,int vk = wait(0 K);;wait for any key press
,if(vk=8);;if backspace key remove 1 from total count
,,x-1
,,if x<0;;if x goes below 0 reset x to 0
,,,x=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
,,x+1
,,out x
,,if x=5
,,,Beep 600 1000
,,,break
Posts: 1,338
Threads: 61
Joined: Jul 2006
as far as the web page what Qm function you will use depends on your browser
Posts: 17
Threads: 3
Joined: Feb 2013
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?
Thanks.
Mohnish
Posts: 1,338
Threads: 61
Joined: Jul 2006
oops made a typo in the function(was short 1 number in vk<122) It has been corrected above.
Posts: 12,092
Threads: 142
Joined: Dec 2002
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.