Xenobiologist Posted August 24, 2006 Share Posted August 24, 2006 HI, just did that for somebody who PMed me. Maybe some other people like it, too. Although it is nearly the same as _MouseTrap() expandcollapse popupOpt("OnExitFunc", "endscript") HotKeySet("1", "end") _MouseStop(100, 100) For $i = 0 To 100 ToolTip($i & " of 100") Sleep(100) Next _MouseStop() Func _MouseStop($posX = 0, $posY = 0) Local $av_ret If @NumParams = 2 Then Local $Rect = DllStructCreate("int;int;int;int") If @error Then Return 0 DllStructSetData($Rect, 1, $posX) DllStructSetData($Rect, 2, $posY) DllStructSetData($Rect, 3, $posX) DllStructSetData($Rect, 4, $posY) $av_ret = DllCall("user32.dll", "int", "ClipCursor", "ptr", DllStructGetPtr($Rect)) ElseIf @NumParams = 0 Then $av_ret = DllCall("user32.dll", "int", "ClipCursor", "int", 0) EndIf Return $av_ret[0] EndFunc ;==>_MouseStop Func end() Exit (0) EndFunc ;==>end Func endscript() _MouseStop() Exit (0) EndFunc ;==>endscript So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
GaryFrost Posted August 24, 2006 Share Posted August 24, 2006 Same Api, the _MouseTrap should work exactly the way yours worked. Opt("OnExitFunc", "endscript") #include <Misc.au3> HotKeySet("1", "end") _MouseTrap(100,100) For $i = 0 To 100 ToolTip($i & " of 100") Sleep(100) Next _MouseTrap() Func end() Exit (0) EndFunc ;==>end Func endscript() _MouseTrap() Exit (0) EndFunc ;==>endscript SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Xenobiologist Posted August 24, 2006 Author Share Posted August 24, 2006 Hi, yes, but you have to include<Misc.au3> Never thought this was something special! Only for the guy who pmmed me. So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
GaryFrost Posted August 24, 2006 Share Posted August 24, 2006 Hi,yes, but you have to include<Misc.au3> Never thought this was something special! Only for the guy who pmmed me. So long,Mega include <Misc.au3> so don't have re-invent the wheel, but I'm sure it was a learning experiance all the same.Gary SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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