HotKeySet("{Esc}", "Swirl")
GUICreate("超级漩涡", 445, 252, 335, 307)
$Checkbox1 = GUICtrlCreateCheckbox("开始漩涡", 160, 150, 81, 57)
$lable1 = GUICtrlCreateLabel("圈数(一半圈数向内旋,一半圈数向外旋):",160,30,250,25)
$lable2 = GUICtrlCreateLabel("移动快慢(1为最慢):",160,90,150,25)
$Input1 = GUICtrlCreateInput("15",160,50,50,25)
$Input2 = GUICtrlCreateInput("8",160,120,50,25)
$button = GUICtrlCreateButton ("开始运行",250,170)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $button
Swirl()
EndSwitch
WEnd
Func Swirl()
If GUICtrlRead($Checkbox1) = 4 Then Return
$round = GUICtrlRead ($Input1)
$step = GUICtrlRead ($input2)
_Circle(@DesktopWidth / 2, @DesktopHeight / 2, 200,$round,$step)
EndFunc ;==>Swirl
Func _Circle($iCenterX, $iCenterY, $iRadius, $iRound = 20, $iStep = 5, $pi = 3.14159265358979)
Local $iMouseX, $iMouseY,$iend = $iRound *360,$iR = $iRadius
For $i = 1 To $iend Step $iStep
$iMouseX = $iCenterX + $iR * Cos($i * $pi / 180)
$iMouseY = $iCenterY + $iR * Sin($i * $pi / 180)
$iR -= ($iRadius/($iRound/2)/(360/$iStep))
MouseMove($iMouseX, $iMouseY, 1)
Next
EndFunc ;==>_Circle
Func _Exit()
Exit
EndFunc ;==>_Exit