Roll the mouse wheel?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
wells50
Newbie
Posts: 14
Joined: Sat Mar 04, 2006 9:58 pm
Location: Edina, Minnesota USA
Contact:

Roll the mouse wheel?

Post by wells50 » Sat Mar 04, 2006 10:04 pm

Is there any way to script the rolling of the mouse wheel forward or backward? I work with an application that changes the font size in a viewing window only if the Ctrl key is depressed and the mouse wheel is rolled forward. There are no other controls that affect the font size. Is there any chance of using Macro Scheduler to mimic the rolling of the mouse wheel a number of clicks? Thanks.
Wells H. Anderson
Active Practice LLC

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

Post by Marcus Tettmar » Sat Mar 04, 2006 11:15 pm

Like this:

/*
120 is one mouse wheel increment. Positive increments of 120 is up,
Negative increments of 120 is down.

This example wheels the mouse down three increments in FireFox
*/

SetFocus>firefox*
Let>MOUSEEVENTF_WHEEL=2048
LibFunc>user32,mouse_event,r,MOUSEEVENTF_WHEEL,0,0,-260,0
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
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Sun Mar 05, 2006 5:27 pm

LibFunc>user32,mouse_event,r,MOUSEEVENTF_WHEEL,0,0,-260,0
Should the trailing 260 be a 360?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

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

Post by Marcus Tettmar » Sun Mar 05, 2006 5:32 pm

Yes, well spotted. It would still have moved it - but probably only 2 jumps.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

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