| View previous topic :: View next topic |
| Author |
Message |
ChalamiuS
Joined: 04 Jun 2006 Posts: 189
|
Posted: Mon Jan 07, 2008 8:36 pm Post subject: [function]Fade |
|
|
Just a fade function
Please note that this script have no effect on Win98/95 or NT4
The function
| Code: |
/*
Fade function by ChalamiuS with help from tic
Use:
Fade(WindowName,StartAlpha,EndAlpha,Sleep)
*/
Fade(Window, FromAlpha=255, ToAlpha=0, Sleep=5)
{
Loop, % (FromAlpha > ToAlpha) ? (FromAlpha-ToAlpha)//5 : (ToAlpha-FromAlpha)//5 ;%
{
FromAlpha := (FromAlpha > ToAlpha) ? FromAlpha-5 : FromAlpha+5
WinSet, Transparent, %FromAlpha%, %Window%
Sleep %Sleep%
}
}
|
_________________ IRC Mibbit
Last edited by ChalamiuS on Tue Nov 04, 2008 1:56 pm; edited 8 times in total |
|
| Back to top |
|
 |
Elevator_Hazard
Joined: 28 Oct 2006 Posts: 302 Location: US
|
Posted: Tue Jan 08, 2008 2:54 am Post subject: |
|
|
Nifty, I'd hate to rain on your parade but... I think you can use the AnimateWindow dll to do those things, but maybe you can't use that dll on other windows... _________________ Changed siggy at request of ahklerner  |
|
| Back to top |
|
 |
ChalamiuS
Joined: 04 Jun 2006 Posts: 189
|
Posted: Tue Jan 08, 2008 9:06 am Post subject: |
|
|
Does that one have a setable Sleeptime ?
Edit:
DOH it did but I still like my own better  _________________ IRC Mibbit |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 3652 Location: Belgrade
|
Posted: Tue Jan 08, 2008 10:44 am Post subject: |
|
|
There is very important difference between AnimateWindow and this.
AnimateWindow will stop the script while animation is active, while sleep in the loop of the above function will let the script interupt animation. _________________
 |
|
| Back to top |
|
 |
almex
Joined: 16 Oct 2007 Posts: 9
|
Posted: Tue Jan 08, 2008 6:45 pm Post subject: |
|
|
| That's neat! Thanks! |
|
| Back to top |
|
 |
|