I have had some ergonomic issues in the past and a while back I saw a company trying to sell a program that "autoclicks" the mouse for you. I thought it was ridiculous to pay for something that was so simple and figured I could create something similar with MS Scheduler. Sure enough I was able to and thought I'd share. I have no idea if anyone might find it useful but I figured I could at least illustrate yet another way MS is so useful and awesome.
Description
When you run the script it merely waits for your mouse move and then once it has stopped moving it clicks the mouse one time. The end result is wherever you move the mouse it will click once once it's stopped.
Enjoy!
Code: Select all
//Created by Josh Sarver
//There are two components, the click subroutine and the actionloop.
//The click subroutine simply runs waiting to detect mousemovement. As soon as it's detected it goes to the main actionloop
//The actionloop detects when the mouse movement has stopped. Once it has, it initiates the click sub routine which does a single mouse click and then waits for the mouse to move again and the process repeats.
//This sub just runs over and over waiting for the mouse cursor position to change
srt>click
let>w=0
lclick
repeat>w
GetCursorPos>x1,y1
wait>.15
getcursorpos>x2,y2
wait>.25
if>{(%x1% <> %x2%) or (%y1% <y2>w=1
else
let>w=0
endif
until>w,1
end>click
//This loop merely waits for the mouse position to stop and then calls the click sub.
label>actionloop
GetCursorPos>x1,y1
wait>.15
Getcursorpos>x2,y2
wait>.25
//compares the two x,y cursor positions and if there is no difference it assumes the mouse is done moving and will call the click sub.
if>{(%x1% = %x2%) or (%y1% = %y2%)}
gosub>click
else
endif
goto>actionloop