AutoHotkey Community

It is currently May 27th, 2012, 3:19 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 36 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: October 20th, 2005, 4:57 am 
Offline

Joined: September 23rd, 2005, 8:18 pm
Posts: 55
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



Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2005, 6:13 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2545
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2005, 12:03 pm 
Offline

Joined: September 23rd, 2005, 8:18 pm
Posts: 55
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 :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 20th, 2005, 6:44 pm 
Offline

Joined: September 23rd, 2005, 8:18 pm
Posts: 55
But this method has it flaws like it put itself over fullscreen applications like movieplaying so an other method would be better.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2005, 5:15 am 
Offline
User avatar

Joined: December 29th, 2004, 1:28 pm
Posts: 2545
One method might be to check the currently active app. and remove AlwaysOnTop if the app is running fullscreen...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2005, 7:39 am 
Offline

Joined: September 23rd, 2005, 8:18 pm
Posts: 55
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 21st, 2005, 4:20 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
The other way around might be better: check if the taskbar is visible, then put the slider on top.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 2nd, 2005, 5:25 pm 
Offline

Joined: September 23rd, 2005, 8:18 pm
Posts: 55
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 2nd, 2005, 6:21 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2005, 9:14 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
The right solution is here.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2005, 12:54 pm 
Offline

Joined: September 25th, 2005, 4:31 pm
Posts: 610
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2005, 3:42 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
What should it do? It does not seem to do anything in my system.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2005, 10:18 pm 
Offline

Joined: September 25th, 2005, 4:31 pm
Posts: 610
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 8th, 2005, 11:20 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 9th, 2005, 12:07 am 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
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!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 36 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group