WaitKeyDown and mouse clicks

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

WaitKeyDown and mouse clicks

Post by JRL » Mon Dec 12, 2005 8:21 pm

This has been discussed before but I have never seen a definitive resolution of the topic. If there is a solution I would appreciate information about it.

WaitKeyDown works for many virtual keys but I've never been able to make it work with mouse clicks.

WKD>VK1
// OR //
WKD>VK2

will wait forever with no response from mouse clicking. Is it possible to have WaitKeyDown respond to a mouse click?

Thanks for listening,
Dick

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Dec 13, 2005 10:22 am

This will be sorted. If you are running 8 beta, check out the OnEvent and KEY_DOWN event. This does detect the mouse buttons correctly and can also accept modifier keys (e.g. you can make it detect Shift+Left button). WaitKeyDown will also work properly with mouse buttons when 8.0 is released.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Jan 11, 2006 10:12 pm

Just installed V8.0 today. I've tested the WaitKeyDown>VK1 to wait for a mouse click and it works very well.
:D

Thank you MJT,
Dick

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Wed Jan 11, 2006 10:14 pm

Note also the KEY_DOWN event type you can use with OnEvent. This allows you to detect and respond to a key down event at any time during script execution, even if you don't know when it might occur.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Jan 11, 2006 10:33 pm

Yes, I've been experimenting with that also. It adds a new dimension to the possibilities of scripting with Macro Scheduler. It will take me a while to make it part of my thought process when programming.

Awesome new feature.

Dick

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts