Jump to content

Mouse Spiral


greenmachine
 Share

Recommended Posts

I made this for fun, it's really simple and really cool. Starting in the center, it spirals the mouse out to the edge of the desktop, and then back into the middle... endlessly. Internal speaker (Beep function) has the frequency relative to the distance from the center, so it rises as it spins out, and lowers as it spins in. Default is to have the beep off, so you can either change that or run it with a 1 as a parameter.

HotKeySet ("{ESC}", "quitme")
; command line param: beep (0 = off, 1 = on)
Global $MakeNoise = 0
If $CmdLine[0] = 0 Then
    $MakeNoise = 0
ElseIf $CmdLine[1] = 1 Then
    $MakeNoise = 1
EndIf

Global Const $PI = 3.1415926535897932384626433832795
Global $Width = @DesktopWidth, $Height = @DesktopHeight, $MidX = $Width/2, $MidY = $Height/2
Global $Radius = 5
Global $Step = $PI/6
ToolTip ("Mouse Mover!!", $MidX, $MidY)
While 1
    Do
        For $angle = 0 To 2*$PI Step $Step
            $Radius += 5
            MouseMove ($MidX - (Cos ($angle) * $Radius), $MidY - (Sin ($angle) * $Radius), 0)
            If $MakeNoise = 1 Then
                Beep ($Radius*5, 2)
            EndIf
        Next
    Until $Radius >= $MidY
    Do
        For $angle = 0 To 2*$PI Step $Step
            $Radius -= 5
            MouseMove ($MidX - (Cos ($angle) * $Radius), $MidY - (Sin ($angle) * $Radius), 0)
            If $MakeNoise = 1 Then
                Beep ($Radius*5, 2)
            EndIf
        Next
    Until $Radius <= 5
WEnd

Func quitme()
    Exit
EndFunc
Link to comment
Share on other sites

Uhh... :king: ...

AWESOME!!! :lmao:o:)

Script worked perfectly for me...

Set it to use sounds by explicitly re-setting $MakeNoise to 1 after the If...Then...EndIf...

Ran with AutoIt3 v3.1.1.103 -- didn't compile -- and it all worked great! :lol:

;)

[right][img]style_emoticons/autoit/robot.gif[/img]One of TenSecondary Adjunct of Unimatrix Z03[/right]

Link to comment
Share on other sites

ahhh i hate math lol

but really

NICE SCRIPT!

AutoIt Console written in C#. Write au3 code right at the console :D_FileWriteToLineWrite to a specific line in a file.My UDF Libraries: MySQL UDF Library version 1.6 MySQL Database UDF's for AutoItI have stopped updating the MySQL thread above, all future updates will be on my SVN. The svn location is:kan2.sytes.net/publicsvn/mysqlnote: This will still be available, but due to my new job, and school hours, am no longer developing this udf.My business: www.hirethebrain.com Hire The Brain HireTheBrain.com Computer Consulting, Design, Assembly and RepairOh no! I've commited Scriptocide!
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...