Accessing Scroll Wheel on Mouse

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Accessing Scroll Wheel on Mouse

Post by kpassaur » Thu May 23, 2019 12:27 pm

Here is the issue - the Press Page Down does not always work. 99% of the time it does, however sometimes it does nothing in the script and when I manually press it nothing happens either. It really makes no sense to me. However if I use the scroll wheel on the mouse and move it a fraction of an inch it works again. It seems to be related to the web page it is on as it will be fine on 10-20 pages and then act up two or three times on one.

My thought is if I can just move the scroll wheel a little before the Press Page Down is executed it would correct it. But I can't seem to find anything on how to do it.

User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Accessing Scroll Wheel on Mouse

Post by Grovkillen » Thu May 23, 2019 12:38 pm

Sounds like a focus thing. The scroll wheel will set focus to whatever is below the pointer.
Let>ME=%Script%

Running: 15.0.24
version history

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Re: Accessing Scroll Wheel on Mouse

Post by kpassaur » Thu May 23, 2019 12:44 pm

Yeah, but how to fix it. The script is rather simple the cursor moves to a position on the web page and clicks it. It repeats this process 5 times and then Press Page Down is run so the page is refreshed. The cursor is above the page because you can manually move the wheel and the page moves, so it does have focus.

User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Accessing Scroll Wheel on Mouse

Post by Grovkillen » Thu May 23, 2019 1:18 pm

If you do a click (within the script) prior to the page down?

If you do a scroll wheel action with the mouse it will do a focus automatically, not by simply moving the cursor.
Let>ME=%Script%

Running: 15.0.24
version history

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Re: Accessing Scroll Wheel on Mouse

Post by kpassaur » Thu May 23, 2019 1:23 pm

Yes it clicks and then Press Page Down is executed. As mentioned it works 99% of the time. I think I may have a work around. I have just tried image recognition and I am moving the mouse to the down arrow button and clicking on that before the Press Page Down.

The downside is since I can't duplicate it I really won't know if it is actually fixed until it is run numerous times.

User avatar
Grovkillen
Automation Wizard
Posts: 1009
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Accessing Scroll Wheel on Mouse

Post by Grovkillen » Thu May 23, 2019 1:50 pm

It could be something else stealing the focus in that 1% of the cases?
Let>ME=%Script%

Running: 15.0.24
version history

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Re: Accessing Scroll Wheel on Mouse

Post by kpassaur » Thu May 23, 2019 2:00 pm

The left clicking the down arrow did not always work. However, if I use the LDown function Wait>.2 and then the LUp it seems to work better.

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