Mingre Posted April 9, 2012 Share Posted April 9, 2012 (edited) Hello AutoIt forums, I have a dual monitor setup and I wrote a simple script that will prevent my cursor to move out from my primary monitor. Here's what I did: Do $pos = MouseGetPos() If $pos[0] >= @DesktopWidth Then Mousemove(@DesktopWidth - 1, $pos[1],0) Elseif $pos[0] <= 0 Then Mousemove(0, $pos[1],0) EndIf Until 0 It's working fine, though I guess there's a better way to do it. (Or is this the best way?) Though please don't tell me just to turn off the dual monitor setup. Thank you! Edited April 9, 2012 by Lilbert Link to comment Share on other sites More sharing options...
Mingre Posted April 9, 2012 Author Share Posted April 9, 2012 Thanks 69255! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now