Jump to content

Recommended Posts

Posted (edited)

it totaly usless but its kinda cool :)

$r = 200
$pi = 3.14159265358979
$x = @DesktopWidth/2
$y = @DesktopHeight/2
$wx = 20
$wy = 20

$Gui = GUICreate("Test",200,400,-1,-1)
GUISetState()
_SpiralEffect($Gui,0)

While 1
    $msg = GUIGetMsg()
    if $msg = -3 then 
        _SpiralEffect($Gui,1)
        ExitLoop
    EndIf
WEnd
Func _SpiralEffect($S_Hwnd,$In_Out = 0)
    $angle = 0
    $Pos_Size = WinGetPos($S_Hwnd)
    if $In_Out = 0 Then
        While 1
            $angle += 10
            If $angle > 360 Then $angle = 0
            Sleep(1)
            $r += 0.1
            WinMove($S_Hwnd,"",$x + ($r * Sin(($pi*2/360)*$angle)), $y + ($r * Cos(($pi*2/360)*$angle)) ,$wx,$wy)
            if $Pos_Size[2] > $wx Then 
                $wx += 2
            EndIf
            If $Pos_Size[3] > $wy Then 
                $wy += 2
            EndIf
            If $Pos_Size[2] <= $wx and $Pos_Size[3] <= $wy Then 
                ExitLoop
            EndIf
            $x -= 0.8
            $y -= 0.8
        WEnd
        Do
            $angle+= 10
            If $angle > 360 Then $angle = 0
            Sleep(1)
            $r += 0.1
            WinMove($S_Hwnd,"",$x + ($r * Sin(($pi*2/360)*$angle)), $y + ($r * Cos(($pi*2/360)*$angle)) ,$wx,$wy)
            $Win_Pos = WinGetPos($S_Hwnd)
            If $Win_Pos[1] < 0 Then WinMove($S_Hwnd,"",$Win_Pos[0],0)
        Until $angle = 180
    ElseIf $In_Out = 1 Then
        For $Angle = 180 to 0 Step -11
            Sleep(1)
            $r += 0.1
            WinMove($S_Hwnd,"",$x + ($r * Sin(($pi*2/360)*$angle)), $y + ($r * Cos(($pi*2/360)*$angle)) ,$wx,$wy)
            $wx -= 2
            $wy -= 2
            $x += 1
            $y += 1
        Next    
        For $p = 1 to 4
            For $Angle = 360 to 0 Step -11
                Sleep(1)
                $r += 0.1
                WinMove($S_Hwnd,"",$x + ($r * Sin(($pi*2/360)*$angle)), $y + ($r * Cos(($pi*2/360)*$angle)) ,$wx,$wy)
                $wx -= 2
                $wy -= 2
                $x += 1
                $y += 1
            Next
        Next
    EndIf
EndFunc
Edited by Alek

[font="Impact"]Never fear, I is here.[/font]

Posted

ok, it now spins until the window is the correct size, so you can now create the gui any size you want the biger it is the longer it will spin :)

[font="Impact"]Never fear, I is here.[/font]

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
  • Recently Browsing   0 members

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