AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Window Fader

 
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
Nick[420Money]



Joined: 27 Oct 2007
Posts: 21
Location: Hawaii

PostPosted: Sat Nov 22, 2008 10:40 pm    Post subject: Window Fader Reply with quote

A simple slider bar, that attaches itself to the title bar of the window, drag the slider, and it will make the window its attached to transparent, still in beta, don't change the transparency of your desktop like a script kiddie please, it screws your icons, and wallpaper over, maybe for good, still haven't restarted.

Quite small too.

EDIT1:
Made the slider slightly transparent, as so it doesn't stick out on the blue bar.
Made it shrink, as the window shrinks, so it doesn't stick off the window when it gets to small.
Made it stick to the window when moved.

Code:
SetBatchLines, -1
SetTimer, Move, 10
SetTimer, Window, 1
Gui, Add, Slider, Range0-255 x0 y0 w230 h20 vFade gTrans, 255
Gui, +AlwaysOnTop +ToolWindow -Caption
Gui, Show, x521 y10 h16 w237, Fader
WinSet, Transparent, 150, Fader
Return

Move:
GuiControl, Move, Fade, x0 y0 w%WWidth% h20
Gui, Show, NoActivate x%WX% y%WY% h16 w%WWidth%
Return

Window:
WinGetActiveStats, Title, Width, Height, X, Y
If(Title == "Fader")
   Return
PastTitle := Title
WWidth := Width/6
WY := Y+10
WX := X+Width - 75 -WWidth
Return

Trans:
Gui, Submit, NoHide
ControlFocus, %PastTitle%
WinSet, Transparent, %Fade%, %PastTitle%
Return



Constructive criticism welcome.
_________________

0100111001101001011000110110101101011011001101000011001000110000010011010110111101101110011001010111100101011101


Last edited by Nick[420Money] on Sun Nov 23, 2008 12:45 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Jex



Joined: 01 Aug 2008
Posts: 101

PostPosted: Sat Nov 22, 2008 11:43 pm    Post subject: Reply with quote

COOL! Very Happy
it slows down window resizing, and window dragging tho.
_________________
Woot.

Please read forum etiquette
Back to top
View user's profile Send private message
Ice_Tea



Joined: 12 Jan 2008
Posts: 131

PostPosted: Sat Nov 22, 2008 11:45 pm    Post subject: Reply with quote

This is cool;

Hmm, well since this tool is focused on additional functions for windows, why not add a few other "common" controls, as roll up the window, minimize to tray etc.. but it's jsut a suggestion imho.

Didn't look through your code properly, but the Settimer could be a bit devastating if you're running the program in the background... I tend to code my scripts in such ways that they barely affect the pc (Only on scripts that are meant to run the whole time)...
Back to top
View user's profile Send private message
Nick[420Money]



Joined: 27 Oct 2007
Posts: 21
Location: Hawaii

PostPosted: Sun Nov 23, 2008 12:08 am    Post subject: Reply with quote

Ice_Tea wrote:

Didn't look through your code properly, but the Settimer could be a bit devastating if you're running the program in the background... I tend to code my scripts in such ways that they barely affect the pc (Only on scripts that are meant to run the whole time)...


Bleh I know I couldn't find a way to get it to stay on the bar maybe ill set it to like 10Ms.
And yeah I was kinda thinking that like having a windows function script like, min2tray, roll up, and this all in one script but lets work the kinks out of this first.

And @ Jex thanks lol this is my first script actually Heh Rolling Eyes

Also my computer has dump truck loads of ram lol I think I have like 8 gigs or so of ram, so it doesn't affect me at all I may make a settings window for it, that would work.
_________________

0100111001101001011000110110101101011011001101000011001000110000010011010110111101101110011001010111100101011101
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Nick[420Money]



Joined: 27 Oct 2007
Posts: 21
Location: Hawaii

PostPosted: Sun Nov 23, 2008 1:41 am    Post subject: Reply with quote

Trying to find a way to tell when the user switches to a new window, so it can retrieve the attributes I need(Always On Top, Transparency Level, Ect.)
Any ideas?
_________________

0100111001101001011000110110101101011011001101000011001000110000010011010110111101101110011001010111100101011101
Back to top
View user's profile Send private message Send e-mail MSN Messenger
Krogdor



Joined: 18 Apr 2008
Posts: 1390
Location: The Interwebs

PostPosted: Sun Nov 23, 2008 1:48 am    Post subject: Reply with quote

Well, I posted some info here on a way to check for active window change, but its straight from MSDN and I have no idea how to use for AHK... unfortunately the thread has received no replies so it seems that no one else does, either ):
Back to top
View user's profile Send private message AIM Address
Nick[420Money]



Joined: 27 Oct 2007
Posts: 21
Location: Hawaii

PostPosted: Sun Nov 23, 2008 6:38 am    Post subject: Reply with quote

Added a button to make the current window always on top, but still no way to tell when the active window changes.
_________________

0100111001101001011000110110101101011011001101000011001000110000010011010110111101101110011001010111100101011101
Back to top
View user's profile Send private message Send e-mail MSN Messenger
pokercurious



Joined: 16 Dec 2007
Posts: 48

PostPosted: Wed Nov 26, 2008 12:52 am    Post subject: Reply with quote

You might want to look into ShellHook messages. I learned quite a lot from this script: http://www.autohotkey.com/forum/topic35623.html
Back to top
View user's profile Send private message
Fry



Joined: 01 Nov 2007
Posts: 885

PostPosted: Wed Nov 26, 2008 1:06 am    Post subject: Reply with quote

Super Small Change > Added AltSubmit so the window fades realtime

Code:
SetBatchLines, -1
SetTimer, Move, 10
SetTimer, Window, 1
Gui, Add, Slider, Range0-255 x0 y0 w230 h20 vFade gTrans, 255
Gui, +AlwaysOnTop +ToolWindow -Caption
Gui, Show, x521 y10 h16 w237, Fader
WinSet, Transparent, 150, Fader
Return

Move:
GuiControl, Move, Fade, x0 y0 w%WWidth% h20
Gui, Show, NoActivate x%WX% y%WY% h16 w%WWidth%
Return

Window:
WinGetActiveStats, Title, Width, Height, X, Y
If(Title == "Fader")
   Return
PastTitle := Title
WWidth := Width/6
WY := Y+10
WX := X+Width - 75 -WWidth
Return

Trans:
Gui, Submit, NoHide
ControlFocus, %PastTitle%
WinSet, Transparent, %Fade%, %PastTitle%
Return
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group