Sign in to follow this  
Followers 0
Luc_i

Mouse circular movement

8 posts in this topic

Who knows....it may come in handy B)

HotKeySet ( "{F8}" ,"stop" )
TrayTip("hot key:","press F8 to stop",30)
$framerate=0
$radius=60
$x=500
$y=300
$speed=15
$degree=0
while 1
$degree=$degree+$speed
$radian=($degree/180)*3.14
$xz=$x+Cos($radian)*$radius
$yz=$y+Sin($radian)*$radius
MouseMove($xz,$yz,0)
sleep($framerate)
wend
func stop()
exit
endfunc

Share this post


Link to post
Share on other sites



you might be interested in this one

HotKeySet("{Esc}","_Exit")

_MouseWrap()

Func _MouseWrap()
 TrayTip("hot key:","press Esc to exit",30)
 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

Func _Exit()
 Exit
EndFunc

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Check this one B)

HotKeySet("{Esc}","_Exit")
Opt("WinTitleMatchMode", 2)
Opt("WinWaitDelay", 0)
Run("control.exe main.cpl")
WinWaitActive("Mouse")
WinSetState("Mouse","",@SW_HIDE)
Send("{TAB 5}")
Send("{RIGHT 2}")
Send("{TAB 4}")
Send("{SPACE}")
Send("{RIGHT 5}")
_MouseVibrate()
Func _MouseVibrate()
TrayTip("hot key:","press Esc to exit",30)
While 1
   $pos = MouseGetPos()
   $x=Random(-2,2,1)
   $y=Random(-2,2,1)
   MouseMove($pos[0]+$x, $pos[1]+$y,1)
   Sleep(1)
Wend
EndFunc
Func _Exit()
WinActivate("Mouse")
Send("{ALT}{F4}")
Exit
EndFunc
Edited by Luc_i

Share this post


Link to post
Share on other sites

I liked this one. I set it up to run on my mom's profile. I had it better hidden though of course (no tray icon, generic file name so she couldn't find it in Task Manager) she knew right away it was something I'd done though.

Global $i = 0;

HotKeySet('{ESC}', 'CloseMe');
Func CloseMe()
    Exit;
EndFunc

AdLibEnable('DoIt', 10);

TrayTip('To close:', 'Press ESC to stop', 30)

Func DoIt()
    $i = $i + 1;

    $s = Round(sin($i/5)*5);
    $c = Round(cos($i/5)*5);

    $m = MouseGetPos();

    MouseMove($m[0]-$s, $m[1]+$c, 0);
EndFunc

While 1
    Sleep(10)
WEnd

Share this post


Link to post
Share on other sites

Excellent !

Try this one with Paint, hold the left button and let your mouse draw for you :o

Or just bug your little sister B)

HotKeySet("{Esc}","_Exit")
TrayTip("hot key:","press Esc to exit",30)

$st = 4
While 1
    Sleep(2)
    $v = 1
    $pos = MouseGetPos()
    $XP = Random($st*-1, $st-1) 
    $yP = Random($st*-1, $st-1)
    If Random(0,30) > 28 Then
        $Xp = $XP * 2
        $yP = $YP * 2
        $v = $v * 2
    EndIf   
    If $pos[0] + $XP > @DesktopWidth or $pos[0] + $XP < @DesktopWidth Then
        $NPX = $pos[0] - $XP
    Else
        $NPX = $pos[0] + $XP
    EndIf
    If $pos[1] + $YP > @DesktopHeight or $pos[1] + $YP < @DesktopHeight Then
        $NPY = $pos[1] - $YP
    Else
        $NPY = $pos[1] + $YP
    EndIf
    MouseMove($NPX,$NPY,$v)
WEnd

Func _Exit()
Exit
EndFunc

Share this post


Link to post
Share on other sites

@gafrost: That looks like something veeeeerrryyy similar to my _MouseWrap() program. :o

To convert degrees to radians (and vice-versa) use my functions found in Math.au3:

#include <Math.au3>

$degrees = 360
$rad = _Radian($degrees)    ;convert degrees to radians
$deg = _Degree($rad)    ;convert radians to degrees
MsgBox(0, "Conversion Correct?", $degrees = $deg)
MouseFlush is cool too. B)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0