Jump to content

WinMoveAnimated library: Move, resize, transform and change transparecy to windows gradually


antiufo
 Share

Recommended Posts

I've created a library that lets you to gradually transform a window into an other changing the position and the transparency.

The best way to explain the effect is seeing it, so here is a short demo:

5/5 for the work you put into the script!

You should consider "skipping" frames to speed up the display... I have a pretty fast laptop with a 512MB Gfx card but your script was not all that fast on it...

What I meant you should do is:

Eg: Instead of

For $i = 255 To 0

WinSetTrans("title", $i)

next

do:

For $i = 255 To 0 Step 15

WinSetTrans("title", $i)

next

Edited by Koshy John
Link to comment
Share on other sites

I've created a library that lets you to gradually transform a window into an other changing the position and the transparency.

The best way to explain the effect is seeing it, so here is a short demo:

Nice i like it

Link to comment
Share on other sites

  • 1 month later...

made this a while back, maybe u can replace your gui creation with something like this.

so it will work prettier on windows that aren't GUI of autoit

;===============================================================================
;
; Description:      Moves a window gradually changing the position and size.
; Parameter(s):             $handle: Handle of the window to move
;                           $xPosition: New x position of the window
;                           $yPosition: New y position of the window
;                           $width: (optinal) New width of the window or -1 to keep the same
;                           $height: New height of the window or -1 to keep the same
;                            $speed: (optional) number between 1 and 10 to indicate speed
; Return Value(s):  None
; Author(s):        KJ, http://phenixdoc.googlepages.com/
;
;===============================================================================
Func _MoveAnimated($handle,$xPosition,$yPosition,$width=-1,$hight=-1,$speed=7)
    WinActivate($handle)
    If BitAND(WinGetState($handle),32) Then WinSetState($handle,"",@SW_RESTORE)
    $POS1=WinGetPos($handle)
    If $width=-1 Then $width=$POS1[2]
    If $hight=-1 Then $hight=$POS1[3]
    If $speed > 10 Or $speed < 1 Then $speed = 7
    $speed = $speed/10
    $Difx=$xPosition-$POS1[0]
    $Dify=$yPosition-$POS1[1]
    $Difw=$width-$POS1[2]
    $Difh=$hight-$POS1[3]
    For $i = 0 to 1000
        $perc=$i/1000
        WinMove($handle,"",$POS1[0]+$perc*$Difx,$POS1[1]+$perc*$Dify,$POS1[2]+$perc*$Difw,$POS1[3]+$perc*$Difh)
        Sleep($speed)
    Next
EndFunc
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...