sd333221 Posted August 19, 2006 Posted August 19, 2006 (edited) Hi guys, i planned to redesign my program, to give error if the X coodinate (vertical) changes more than 30, after the function is called this is how far i got: Func roflcopter() $mpos = MouseGetPos ( ) while 1 $finalpos = $mpos $finalpos[0] = $finalpos[0] + 30 if $mpos[0] = $finalpos[0] Then MSGBOX(0, "Alert", "MOUSE MOVED TOO FAR!") EndIf sleep(100) WEnd return(1) Sleep(2000) EndFunc it doesn't even seem to work... Any ideas for this? Thank you mates! Edited August 19, 2006 by sd333221
Xenobiologist Posted August 19, 2006 Posted August 19, 2006 Hi, what about? HotKeySet("1", "roflcopter") While 1 Sleep(100) WEnd Func roflcopter() Local $mpos = MouseGetPos() While 1 $finalpos = MouseGetPos() ToolTip("Border : " & $mpos[0] + 30 & @CRLF & "Position : " & $finalpos[0]) If $finalpos[0] >= $mpos[0] + 30 Then MsgBox(0, "Alert", "MOUSE MOVED TOO FAR!") EndIf Sleep(100) WEnd return (1) Sleep(2000) EndFunc ;==>roflcopter 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
Valuater Posted August 19, 2006 Posted August 19, 2006 (edited) maybe roflcopter() Func roflcopter() Local $mpos = MouseGetPos ( ) Local $finalpos[1] while 1 $finalpos[0] = $mpos[0] + 30 Local $mpos2 = MouseGetPos ( ) if $mpos2[0] >= $finalpos[0] Then MSGBOX(0, "Alert", "MOUSE MOVED TOO FAR!") Exitloop ; ?????? EndIf sleep(100) WEnd return(1) Sleep(2000) EndFunc EDIT: .... i like Mega's better 8) Edited August 19, 2006 by Valuater
sd333221 Posted August 19, 2006 Author Posted August 19, 2006 Hi, what about? HotKeySet("1", "roflcopter") While 1 Sleep(100) WEnd Func roflcopter() Local $mpos = MouseGetPos() While 1 $finalpos = MouseGetPos() ToolTip("Border : " & $mpos[0] + 30 & @CRLF & "Position : " & $finalpos[0]) If $finalpos[0] >= $mpos[0] + 30 Then MsgBox(0, "Alert", "MOUSE MOVED TOO FAR!") EndIf Sleep(100) WEnd return (1) Sleep(2000) EndFunc ;==>roflcopter So long, Mega I love you
Xenobiologist Posted August 19, 2006 Posted August 19, 2006 I love you Wow, thanks! :"> 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
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