erifash Posted November 21, 2004 Posted November 21, 2004 Thanks to ezzetabi's _MouseTrap function topic for the idea!Just some cool piece of code I put together in less than five minutes...Func _MouseWrap() While 1 $pos = MouseGetPos() If $pos[0] < 2 Then MouseMove(@DeskTopWidth - 2, $pos[1], 1) If $pos[0] > @DeskTopWidth - 2 Then MouseMove(2, $pos[1], 1) If $pos[1] < 2 Then MouseMove($pos[0], @DesktopHeight - 2, 1) If $pos[1] > @DeskTopHeight - 2 Then MouseMove($pos[0], 2, 1) Wend EndFuncAny comments/questions would be greatly appreciated! My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver
erifash Posted November 21, 2004 Author Posted November 21, 2004 I usually use Sleep(10) but it really dosen't matter. I remember a BIG debate about that awile ago.Func _MouseWrap() While 1 $pos = MouseGetPos() If $pos[0] < 2 Then MouseMove(@DeskTopWidth - 2, $pos[1], 1) If $pos[0] > @DeskTopWidth - 2 Then MouseMove(2, $pos[1], 1) If $pos[1] < 2 Then MouseMove($pos[0], @DesktopHeight - 2, 1) If $pos[1] > @DeskTopHeight - 2 Then MouseMove($pos[0], 2, 1) Sleep(1) Wend EndFunc My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver
ezzetabi Posted November 21, 2004 Posted November 21, 2004 Nice nice... But I have to remember everyone that Run! have this option integrated.
bcording Posted November 23, 2004 Posted November 23, 2004 That quickly removed my multiple monitor advantage...but still pretty damn fun.
erifash Posted November 23, 2004 Author Posted November 23, 2004 Thanks, guys! I'm glad you like it! My UDFs:_FilePrint() | _ProcessGetName() | _Degree() and _Radian()My Scripts:Drive Lock - Computer Lock Using a Flash DriveAU3Chat - Simple Multiuser TCP ChatroomStringChunk - Split a String Into Equal PartsAutoProxy - Custom Webserver
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