strate Posted May 1, 2006 Posted May 1, 2006 (edited) In one of my scripts I use _CursorClip() out side of a loop. While in the loop if the user pushes the windows key, it will break the clip, and the mouse has free reign on the whole desktop. If I placed the Clip inside of the loop would there be any adverse problems from calling it reptitively? EDIT: This is on a XP Pro SP2. It doesn't do it on 98 though. Edited May 1, 2006 by strate INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
GaryFrost Posted May 1, 2006 Author Posted May 1, 2006 In one of my scripts I use _CursorClip() out side of a loop. While in the loop if the user pushes the windows key, it will break the clip, and the mouse has free reign on the whole desktop. If I placed the Clip inside of the loop would there be any adverse problems from calling it reptitively? EDIT: This is on a XP Pro SP2. It doesn't do it on 98 though. _MouseTrap is part of the Beta UDFs, in the example you'll see I used the call in the while loop, the UDF uses the dll call to ClipCursor, I haven't had any problems with it myself being in the loop Gary Example from beta help: #include <GuiConstants.au3> #include <Misc.au3> Opt ("MustDeclareVars", 1) Dim $GUI, $coords[4], $msg $GUI = GUICreate("Mouse Trap Example", 392, 323) GUISetState() While 1 $coords = WinGetPos($GUI) _MouseTrap ($coords[0], $coords[1], $coords[0] + $coords[2], $coords[1] + $coords[3]) $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd _MouseTrap () Exit SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
strate Posted May 1, 2006 Posted May 1, 2006 _MouseTrap is part of the Beta UDFs, in the example you'll see I used the call in the while loop, the UDF uses the dll call to ClipCursor, I haven't had any problems with it myself being in the loop Gary Example from beta help: #include <GuiConstants.au3> #include <Misc.au3> Opt ("MustDeclareVars", 1) Dim $GUI, $coords[4], $msg $GUI = GUICreate("Mouse Trap Example", 392, 323) GUISetState() While 1 $coords = WinGetPos($GUI) _MouseTrap ($coords[0], $coords[1], $coords[0] + $coords[2], $coords[1] + $coords[3]) $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd _MouseTrap () ExitThank you very much, Is it possible to screw up a pc with a DllCall like I asked about? Or is that just unheard of? INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station...
dandymcgee Posted August 8, 2006 Posted August 8, 2006 Ok, This is SOOOO close to what I'm looking for. Is there by any chance a way to restrict the mouse from going into a certain rectangle on the screen, instead of restricting it to a certain rectangle? I'm almost 100% sure this is possible, but I haven't quite got it figured out... Help me out please. - Dan [Website]
GaryFrost Posted August 8, 2006 Author Posted August 8, 2006 Ok, This is SOOOO close to what I'm looking for. Is there by any chance a way to restrict the mouse from going into a certain rectangle on the screen, instead of restricting it to a certain rectangle? I'm almost 100% sure this is possible, but I haven't quite got it figured out... Help me out please.Think someone else asked this in one of the support sections. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
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