Skip to content

Instantly share code, notes, and snippets.

@kistaaa
Created April 12, 2018 04:06
Show Gist options
  • Save kistaaa/abf84c3c1cd37795ebfc0d247060bf48 to your computer and use it in GitHub Desktop.
Save kistaaa/abf84c3c1cd37795ebfc0d247060bf48 to your computer and use it in GitHub Desktop.
AutoIT Scripts for SFD
#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