 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Serenity
Joined: 07 Nov 2004 Posts: 1270
|
Posted: Wed Nov 10, 2004 7:19 pm Post subject: Transparent menus? |
|
|
| Is it possible to make AHK menus transparent? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Wed Nov 10, 2004 10:28 pm Post subject: |
|
|
Not directly, but keeping the following script running seems to make all menus on the system transparent: | Code: | DetectHiddenWindows On ; Might allow detection of menu sooner.
Loop
{
WinWait, ahk_class #32768
WinSet, Transparent, 150
} |
This will work only on 2k/XP. In addition, if it doesn't work right, you might have to adjust your menu settings in Control Panel > Display > Appearance > Effects > Use the following transition effect for menus and tooltips
The above could be made more selective as follows: | Code: | DetectHiddenWindows On
Loop
{
WinWait, ahk_class #32768
WinGet, ProcessName, ProcessName
if ProcessName = AutoHotkey.exe
WinSet, Transparent, 150
} |
Note: A script cannot make its own menus transparent because timers and other threads cannot be launched while the script is displaying its own menu. Therefore, you would need a separate script. |
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1270
|
Posted: Fri Nov 12, 2004 6:16 pm Post subject: |
|
|
Thanks Chris.
The first script makes all windows menus transparent, which is really cool. I've always wanted slightly transparent menus all round. Unfortunately its a bit slow on detecting. Is there any way to speed up detection?
In hoping to make the start menu transparent, I used AU3_Spy to find out its ahk_class. It says its ahk_class is Shell_TrayWnd, but this actually makes the taskbar transparent! And I found that it remained transparent when I exited the script. This is fantastic!
I'd still like to make the start menu transparent, is it possible it has a different class # to the taskbar? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Sat Nov 13, 2004 12:06 am Post subject: |
|
|
| Quote: | | its a bit slow on detecting. Is there any way to speed up detection? | There are at least two ways. The first way is good except for the fact that it only works when a menu has been clicked on. If you open a menu any other way, it won't be transparent: | Code: | ~LButton::
DetectHiddenWindows, on
IfWinExist, ahk_class #32768
WinSet, Transparent, 150
return |
The second way works more often but it uses about 50% of your CPU's remaining idle power. You could have it "Sleep 10" every 1000 iterations or so, but then there would be times when it isn't quite as responsive: | Code: | DetectHiddenWindows, on
Loop
{
IfWinExist, ahk_class #32768
WinSet, Transparent, 150
} |
| Quote: | | In hoping to make the start menu transparent | It looks like the following makes the change, and maybe it only needs to be done once per reboot/logon:
DetectHiddenWindows, on
WinSet, Transparent, 150, ahk_class BaseBar |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10474
|
Posted: Sat Nov 13, 2004 3:41 pm Post subject: |
|
|
I did a little more testing and the following loop seems like the best compromise. It responds much faster than the WinWait method, while using hardly any CPU time: | Code: | DetectHiddenWindows, on ; Might allow detection of menu sooner.
SetBatchLines -1
Loop
{
IfWinExist, ahk_class #32768
WinSet, Transparent, 150
Sleep, 5 ; Prevents large consumption of CPU time.
}
return |
I've also added the following info to the help file, so thanks for your research: | Quote: | To make the task bar transparent, use WinSet, Transparent, 150, ahk_class Shell_TrayWnd. Similarly, to make the Start Menu transparent, follow this example:
DetectHiddenWindows, on
WinSet, Transparent, 150, ahk_class BaseBar
Note that although such a script cannot make its own menus transparent, it can make those of other scripts transparent. |
|
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1270
|
Posted: Sun Nov 14, 2004 2:18 am Post subject: |
|
|
Thanks again Chris.  |
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1270
|
Posted: Tue Nov 16, 2004 4:24 am Post subject: |
|
|
I found I can disable the desktop and hide icons with the following:
WinSet, Transparent, 0, ahk_class Progman
To restore:
WinSet, Transparent, off, ahk_class Progman |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Thu Apr 21, 2005 12:29 pm Post subject: |
|
|
I encountered a nice side effect of hiding the BaseBar class:
Create an empty folder with the name sf_EmptyBar. Drag the folder from the explorer to the edge of the desktop, XP will create an empty toolbar. Right click it and set it 'Always on Top'. Now run this:
| Code: | | WinSet Transparent, 0, ahk_class BaseBar, sf_EmptyBar | The toolbar disappears, but maximized windows will not occupy the area, so you can put little metering apps like Samurize, Miranda floating contacts, WinAmp, etc there.
This is basically the same what the DesktopCoral utility does. _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
jonny
Joined: 13 Nov 2004 Posts: 3004 Location: Minnesota
|
Posted: Thu Apr 21, 2005 1:13 pm Post subject: |
|
|
| Using transparency usually takes up unnecessary memory, so in this case it might be better to just WinHide it. (Assuming that doesn't cancel the workspace-altering effect) |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Thu Apr 21, 2005 1:24 pm Post subject: |
|
|
| jonny wrote: | | Using transparency usually takes up unnecessary memory, so in this case it might be better to just WinHide it. (Assuming that doesn't cancel the workspace-altering effect) | Tried it, works, thanks for the hint! _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
Serenity
Joined: 07 Nov 2004 Posts: 1270
|
Posted: Thu Apr 21, 2005 3:57 pm Post subject: |
|
|
Nice find. You can call the folder what you want btw. _________________ "Anything worth doing is worth doing slowly." - Mae West
 |
|
| Back to top |
|
 |
SanskritFritz
Joined: 17 Feb 2005 Posts: 283 Location: Hungary, Budapest
|
Posted: Thu Apr 21, 2005 8:00 pm Post subject: |
|
|
| Serenity wrote: | Nice find. You can call the folder what you want btw. |
of course! sf_... stands for SanskritFritz  _________________ Is there another word for synonym? |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|