0

I am trying to create a script (pls be aware that I am not a programmer) using AutoHotkey that opens a web site, positions the mouse at a specified clickable icon and click repeatedly in a pre-determined time interval until the mouse is physically moved. I seem to be able to succeed in all the steps except being able to position the cursor/mouse at the correct spot where the "click" should take place.

I used the built-in "Window Spy" facility to find the pixel position where I want the "click" to take place but this x,y value remains the same even when the active window is manually adjusted (I have to scroll up in order to locate the position I want to click since my laptop's screen size cannot handle the active window size). So, how do I locate the mouse position regardless of the screen size of the computer I happen to use?

Thank you!

1
  • 1
    It's it necessary that the 'click' be from a mouse button? Can you gain focus of the element with Tab and 'click' using Enter? I don't think AutoHotkey can click a position off screen.
    – iglvzx
    Feb 4, 2012 at 5:43

1 Answer 1

0

You could try using MouseClick to send mouse wheel commands and scroll the location you want to click onto the screen. Then position your mouse where you need it to be and start clicking.

MouseClick,WheelUp,,,10,0,D,R

That line will scroll the mouse up through 10 detents (wheel clicks).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .