 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
Phoenix
Joined: 23 Sep 2005 Posts: 55
|
Posted: Thu Oct 20, 2005 3:57 am Post subject: |
|
|
| Code: |
CustomColor = EEAA99
Gui, +AlwaysOnTop +LastFound -caption
Gui, Color, %CustomColor%
WinSet, TransColor, %CustomColor% 255
Gui, Font, S8 CDefault, Verdana
SoundGet, Wave_mute, Wave, mute
if wave_mute = Off
{
Gui, Add, Picture, vPic x5 y5 w10 h15,c:\autopics\muteoff.png
}
else
{
Gui, Add, Picture, vPic x5 y5 w10 h15,c:\autopics\muteon.png
}
Gui, Add, Slider, vSlid gSlid x15 y5 w66 h16, 25
Gui, Show, x1200 y1175 h30 w100, genbar
|
|
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2485
|
Posted: Thu Oct 20, 2005 5:13 am Post subject: |
|
|
There are hopefully a few other methods to keep the GUI on top of the taskbar but one method could be to use a timer to keep setting it AlwaysOnTop.
| Code: | CustomColor = EEAA99
Gui, +AlwaysOnTop +LastFound -caption
Gui, Color, %CustomColor%
WinSet, TransColor, %CustomColor% 255
Gui, Font, S8 CDefault, Verdana
SoundGet, Wave_mute, Wave, mute
if wave_mute = Off
{
Gui, Add, Picture, vPic x5 y5 w10 h15,c:\autopics\muteoff.png
}
else
{
Gui, Add, Picture, vPic x5 y5 w10 h15,c:\autopics\muteon.png
}
Gui, Add, Slider, vSlid gSlid x15 y5 w66 h16, 25
Gui, Show, x1200 y1175 h30 w100, genbar
SetTimer, aot
Return
aot:
Winset, AlwaysOnTop, On, genbar
Return
|
|
|
| Back to top |
|
 |
Phoenix
Joined: 23 Sep 2005 Posts: 55
|
Posted: Thu Oct 20, 2005 11:03 am Post subject: |
|
|
| corrupt wrote: | There are hopefully a few other methods to keep the GUI on top of the taskbar but one method could be to use a timer to keep setting it AlwaysOnTop.
|
It ain't pretty but it works. Thank you very much  |
|
| Back to top |
|
 |
Phoenix
Joined: 23 Sep 2005 Posts: 55
|
Posted: Thu Oct 20, 2005 5:44 pm Post subject: |
|
|
| But this method has it flaws like it put itself over fullscreen applications like movieplaying so an other method would be better. |
|
| Back to top |
|
 |
corrupt
Joined: 29 Dec 2004 Posts: 2485
|
Posted: Fri Oct 21, 2005 4:15 am Post subject: |
|
|
| One method might be to check the currently active app. and remove AlwaysOnTop if the app is running fullscreen... |
|
| Back to top |
|
 |
Phoenix
Joined: 23 Sep 2005 Posts: 55
|
Posted: Fri Oct 21, 2005 6:39 am Post subject: |
|
|
| corrupt wrote: | | One method might be to check the currently active app. and remove AlwaysOnTop if the app is running fullscreen... |
Yeah I actually did just that yesterday and it works good. |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4710 Location: Boulder, CO
|
Posted: Fri Oct 21, 2005 3:20 pm Post subject: |
|
|
| The other way around might be better: check if the taskbar is visible, then put the slider on top. |
|
| Back to top |
|
 |
Phoenix
Joined: 23 Sep 2005 Posts: 55
|
Posted: Wed Nov 02, 2005 4:25 pm Post subject: |
|
|
| Laszlo wrote: | | The other way around might be better: check if the taskbar is visible, then put the slider on top. |
How do i check for that? |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4710 Location: Boulder, CO
|
Posted: Wed Nov 02, 2005 5:21 pm Post subject: |
|
|
You could verify if the working area is the full monitor: | Code: | SysGet Monitor, Monitor
SysGet WorkArea, MonitorWorkArea
Sides = Bottom,Left,Right,Top
TaskBar = 0
Loop Parse, Sides, `,
If (Monitor%A_LoopField% <> WorkArea%A_LoopField%)
TaskBar = 1
MsgBox Visible Taskbar = %TaskBar% | But it only detects if the taskbar is hidden by AutoHide, not a screensaver or full screen video playback. |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4710 Location: Boulder, CO
|
Posted: Tue Nov 08, 2005 8:14 am Post subject: |
|
|
| The right solution is here. |
|
| Back to top |
|
 |
shimanov
Joined: 25 Sep 2005 Posts: 610
|
Posted: Tue Nov 08, 2005 11:54 am Post subject: |
|
|
Try the following:
(this method has actually been used before by Rajat, and myself for a different purpose)
note: tested with Windows XP SP2
note: F12 will exit
| Code: | g_x := A_ScreenWidth-65
Gui, -Caption
Gui, Add, Button, gSayHello, Hello
Gui, Show, x%g_x% y10
Process, Exist
WinGet, hw_gui, ID, ahk_class AutoHotkeyGUI ahk_pid %ErrorLevel%
hw_tray := DllCall( "FindWindowEx", "uint", 0, "uint", 0, "str", "Shell_TrayWnd", "uint", 0 )
DllCall( "SetParent", "uint", hw_gui, "uint", hw_tray )
return
F12::
GuiClose:
ExitApp
SayHello:
MsgBox, Hello, World!
return |
|
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4710 Location: Boulder, CO
|
Posted: Tue Nov 08, 2005 2:42 pm Post subject: |
|
|
| What should it do? It does not seem to do anything in my system. |
|
| Back to top |
|
 |
shimanov
Joined: 25 Sep 2005 Posts: 610
|
Posted: Tue Nov 08, 2005 9:18 pm Post subject: |
|
|
| Laszlo wrote: | | What should it do? It does not seem to do anything in my system. |
It should place a button ("Hello") on the right side of the Taskbar.
Try this simplified code:
(it should place the button covering the Start button)
| Code: | Gui, -Caption
Gui, Add, Button, gSayHello, Hello
Gui, Show, x0 y0
Process, Exist
WinGet, hw_gui, ID, ahk_class AutoHotkeyGUI ahk_pid %ErrorLevel%
hw_tray := DllCall( "FindWindowEx", "uint", 0, "uint", 0, "str", "Shell_TrayWnd", "uint", 0 )
DllCall( "SetParent", "uint", hw_gui, "uint", hw_tray )
return
F12::
GuiClose:
ExitApp
SayHello:
MsgBox, Hello, World!
return |
|
|
| Back to top |
|
 |
evl
Joined: 24 Aug 2005 Posts: 1237
|
Posted: Tue Nov 08, 2005 10:20 pm Post subject: |
|
|
I needed to change the y10 bit to y-8 as it was displaying mostly off screen in the very bottom right corner.
| shimanov wrote: |
Gui, Show, x%g_x% y10
|
| Code: |
Gui, Show, x%g_x% y-8
|
|
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4710 Location: Boulder, CO
|
Posted: Tue Nov 08, 2005 11:07 pm Post subject: |
|
|
| Shimanov rocks! This last script allows me to simplify a few of my scripts, which put all kind of stuff in the taskbar with the help of a timer constantly reactivating them. Thanks! |
|
| 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
|