[Function] Smart WinFade[In|Out]

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: [Function] Smart WinFade[In|Out]

Re: [Function] Smart WinFade[In|Out]

by joedf » 30 Sep 2014, 15:47

no problemo ;)

Re: [Function] Smart WinFade[In|Out]

by h0ll0w » 30 Sep 2014, 08:48

thanks joedf this will help me out a lot!

Re: [Function] Smart WinFade[In|Out]

by joedf » 25 Sep 2014, 11:36

Well, it was originally created for Qonsole ;)
http://qonsole-ahk.sourceforge.net/

Re: [Function] Smart WinFade[In|Out]

by Skrell » 24 Sep 2014, 08:30

What are you currently using this function for Joedf? Are you just using hotkeys to fade the active window at will?

Re: [Function] Smart WinFade[In|Out]

by joedf » 23 Sep 2014, 08:52

You're welcome. :)

Re: [Function] Smart WinFade[In|Out]

by huyaowen » 23 Sep 2014, 02:32

nice,thanks.

[Function] Smart WinFade[In|Out]

by joedf » 03 Nov 2013, 15:45

Arguments
  • w : wintitle
    t : final transparency
    i : increment
    d : delay (between each increment)
Behaviour
  • if : t > current, increases current transparency [i+]
    if : t < current, decreases current transparency [i-]
Usage
  • Code: Select all

    Gui Color, 0x1A1A1A
    Gui +E0x20 -Caption +LastFound +ToolWindow +AlwaysOnTop +hwndHgui
    WinSet, Transparent, 0
    Gui Show, x0 y0 w%A_screenwidth% h%A_screenHeight%
    winfade("ahk_id " Hgui,100,5) ;fade in
    sleep 1000
    winfade("ahk_id " Hgui,10,5) ;fade out
    exitapp
Function
  • Code: Select all

    winfade(w:="",t:=128,i:=1,d:=10) { ; by joedf  -  http://ahkscript.org/boards/viewtopic.php?f=6&t=512
    	w:=(w="")?("ahk_id " WinActive("A")):w
    	t:=(t>255)?255:(t<0)?0:t
    	WinGet,s,Transparent,%w%
    	s:=(s="")?255:s ;prevent trans unset bug
    	WinSet,Transparent,%s%,%w% 
    	i:=(s<t)?abs(i):-1*abs(i)
    	while(k:=(i<0)?(s>t):(s<t)&&WinExist(w)) {
    		WinGet,s,Transparent,%w%
    		s+=i
    		WinSet,Transparent,%s%,%w%
    		sleep %d%
    	}
    }

Top