slightly_abnormal Posted March 19, 2006 Share Posted March 19, 2006 (edited) How can i get this to notify me, or run a program when the mouse of moved? if Mousemove( ) then Msgbox(64,"Warning:","You moved the mouse.",5) endif while 1 sleep(800) wend Edited March 19, 2006 by slightly_abnormal Link to comment Share on other sites More sharing options...
Valuater Posted March 19, 2006 Share Posted March 19, 2006 maybe $pos = MouseGetPos() While 1 $pos1 = MouseGetPos() If $pos1[0] <> $pos[0] Then MsgBox(0,'',"You moved ") ExitLoop EndIf Sleep(20) WEnd 8) Link to comment Share on other sites More sharing options...
Amen Posted March 19, 2006 Share Posted March 19, 2006 (edited) Global $XronikoOrio=4000 Global $x,$Y,$FoundMovement=0,$Terminate GUICreate ( @ScriptName ) Global $Tote=TimerInit() $MouseInfo=GUIGetCursorInfo() $X=$MouseInfo[0] $Y=$MouseInfo[1] Do Sleep(50) $MouseInfo=GUIGetCursorInfo() Select case $FoundMovement=1 $Tote=TimerInit(); Midenise Xronometrith MsgBox(0,"","Mouse moved") $FoundMovement=0 case $MouseInfo[2]=1 or $MouseInfo[3]=1;Mouse Click $FoundMovement=1 ;MsgBox(0,"","Mouse Click") case $X<>$MouseInfo[0] or $Y<>$MouseInfo[1];Mouse Movement $FoundMovement=1 $X=$MouseInfo[0] $Y=$MouseInfo[1] case TimerDiff($Tote)>$XronikoOrio;Mouse not moved for too long! MsgBox(0,"","Mouse not moved last "&$XronikoOrio/1000&" secs!") $Tote=TimerInit() EndSelect Until $Terminate Exit Edited March 19, 2006 by Amen Plugged ThoughtsQBsick? check my Old staff (New Launchers to Work with Windows.Thnx to Autoit!)Game Development ToolsPortes (A Backgammon game)Ball (An Arkanoid Style game)Au3? SecretProgz - Reveals Commands that can be used on your system CleanOut - Uninstall leftovers Enable windows XP Autologon. Stop Windows Auto Sharing your hard drives (C$,D$,etc) D-Link - Create a dynamic link.Useful for server shortcuts Fun - How would your name sounds in Japanese,Russian or Reventian? Fix_srt - Shift a subtitle (.srt) some secs +/- Link to comment Share on other sites More sharing options...
slightly_abnormal Posted March 19, 2006 Author Share Posted March 19, 2006 thanks.. for the simple and more advanced way of doing this Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 19, 2006 Moderators Share Posted March 19, 2006 Along the same lines as Val:Global $i_Saved_MPos = MouseGetPos() While 1 If _TrackMousePos(MouseGetPos()) Then; If Mouse Movement = True Then Do something Beep(1000, 500); Replace Beep() function with whatever you want EndIf Sleep(10) WEnd Func _TrackMousePos($i_Current_MPos) If $i_Current_MPos[0] <> $i_Saved_MPos[0] Or $i_Current_MPos[1] <> $i_Saved_MPos[1] Then $i_Saved_MPos[0] = $i_Current_MPos[0] $i_Saved_MPos[1] = $i_Current_MPos[1] Return 1 EndIf EndFuncExcept it's a function, and you can input it where ever. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
slightly_abnormal Posted March 20, 2006 Author Share Posted March 20, 2006 (edited) Along the same lines as Val:Global $i_Saved_MPos = MouseGetPos() While 1 If _TrackMousePos(MouseGetPos()) Then; If Mouse Movement = True Then Do something Beep(1000, 500); Replace Beep() function with whatever you want EndIf Sleep(10) WEnd Func _TrackMousePos($i_Current_MPos) If $i_Current_MPos[0] <> $i_Saved_MPos[0] Or $i_Current_MPos[1] <> $i_Saved_MPos[1] Then $i_Saved_MPos[0] = $i_Current_MPos[0] $i_Saved_MPos[1] = $i_Current_MPos[1] Return 1 EndIf EndFuncExcept it's a function, and you can input it where ever. hey, thats cool smoke_n, I remember one script where it would do the same thing beap but the pitch would go higher or lower depending on possition of mouse, i forgot where i saw it Edited March 20, 2006 by slightly_abnormal Link to comment Share on other sites More sharing options...
greenmachine Posted March 20, 2006 Share Posted March 20, 2006 hey, thats cool smoke_n, I remember one script where it would do the same thing beap but the pitch would go higher or lower depending on possition of mouse, i forgot where i saw it Did it happen to be this one? http://www.autoitscript.com/forum/index.php?showtopic=20567 Link to comment Share on other sites More sharing options...
slightly_abnormal Posted March 20, 2006 Author Share Posted March 20, 2006 Did it happen to be this one? http://www.autoitscript.com/forum/index.php?showtopic=20567lol! that's not it but that is cool!i'll see if i can find it on my hd.. Link to comment Share on other sites More sharing options...
slightly_abnormal Posted March 20, 2006 Author Share Posted March 20, 2006 (edited) lol! that's not it but that is cool! here it found it with vaulaters searcher thingie #include <misc.au3> #NoTrayIcon $P=1 While 1 if (_IsPressed ("01") and _IsPressed ("02") and _IsPressed ("04")) or $P Then;to exit script you have to hold the buttons half a second Sleep (500) if _IsPressed ("01") or _IsPressed ("02") Then $P=0;if left/rigth mousebutton is klicked start beepthing if _IsPressed ("01") and _IsPressed ("02") and _IsPressed ("04") Then Exit;if left+right+third mousebutton is klicked exit script Else $Mouse = MouseGetPos() $Frequenz =($Mouse[0]/18+10)*($Mouse[1]/18+10);different sounds for mouse coords if _IsPressed ("01") then $Frequenz +=100 if _IsPressed ("02") then $Frequenz +=200;higher sound if left/right mousebutton clicked Beep($Frequenz, 50) Endif WEnd Edited March 20, 2006 by slightly_abnormal Link to comment Share on other sites More sharing options...
greenmachine Posted March 20, 2006 Share Posted March 20, 2006 Ah yes I have seen that one too. People come up with some pretty creative scripts. 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