Created
April 12, 2018 04:06
-
-
Save kistaaa/abf84c3c1cd37795ebfc0d247060bf48 to your computer and use it in GitHub Desktop.
AutoIT Scripts for SFD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <AutoItConstants.au3> | |
$size = 0 | |
; center horizontal of your screen | |
$centerX = @DesktopWidth / 2 | |
; center vertical of your screen | |
$centerY = @DesktopHeight / 2 | |
$PI = 3.141592653589793 | |
$ang = 137.5 | |
Func calculate($pos, $degrees) | |
; convert degrees to rads and get x or y coords | |
local $rads = $degrees * $PI / 180 | |
If $pos == "x" Then | |
Return $centerX + Cos($rads) * $size | |
ElseIf $pos == "y" Then | |
Return $centerY + Sin($rads) * $size | |
EndIf | |
EndFunc | |
; move mouse to the center | |
MouseMove( calculate("x", 0), calculate("y", 0), 1 ) | |
; press button | |
MouseDown($MOUSE_CLICK_LEFT) | |
; move mouse 360 times to complete a circle | |
For $i = 0 To 200 Step 1 | |
MouseMove( calculate("x", $ang), calculate("y", $ang), 2 ) | |
$ang += 137.5 | |
$size += 1.618 | |
Next | |
MouseUp($MOUSE_CLICK_LEFT) | |
; release mouse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment