| View previous topic :: View next topic |
| Author |
Message |
ladiko
Joined: 14 Jul 2006 Posts: 190 Location: Berlin
|
Posted: Fri Sep 07, 2007 7:45 pm Post subject: +AlwaysOnTop doesnt work :( |
|
|
i have a gui that should be a on screen display and the gui-part starts with
| Code: | | Gui +LastFound +AlwaysOnTop -Caption +ToolWindow |
(so it should be on top of all other windows) than i add some controls (only text and pics) and on hotkey press it is shown by
| Code: | WinSet , TransColor , EEAA99 %OSDVisibility%
Gui , 1:Show , y%WinYPos% NoActivate |
for some seconds and then fade out and is hidden by
| Code: | if OSDFadeOut = 1
{
; fade down the OSD by Tekl
Visibility := OSDVisibility
Loop % OSDVisibility / OSDFadeSpeed
{
Visibility -= %OSDFadeSpeed%
Gui +LastFound
WinSet , TransColor , EEAA99 %Visibility%
}
}
Gui , 1:Hide |
until the next keypress.
so for an hour or more (sometimes a lot of hours) it works perfect - it is shown on top off all windows ... but then if i use it, it doent appear - it is under all or under most of all windows, under explorer windows, foobar, firefox, internet explorer etc. and only if i minimize the other windows i can see the osd on top of the desktop or i have to restart the script then it is on top of all windows again.
so somebody could imagine what's the problem? the fade-out before hide?
hmm if nothing works do you think it would be an option to destroy gui and create again every let's say 5 minutes?
to create the gui everytime it is shown, is not an option cause i dont want to wait for the OSD after keypress - it has to appear as fast as possible.
if you wanna see the whole script --> http://phpfi.com/250563
and some screenshots of the osd --> http://forum.msi.com.tw/index.php?topic=98869.0 (english) and http://www.msi-forum.de/thread.php?threadid=24813 (german) |
|
| Back to top |
|
 |
Trikster
Joined: 15 Jul 2007 Posts: 1194 Location: Enterprise, Alabama
|
Posted: Fri Sep 07, 2007 11:49 pm Post subject: |
|
|
Is the GUI label 1? If so, you need
| Code: | | Gui, 1:+LastFound +AlwaysOnTop -Caption +ToolWindow |
_________________ ScriptPad/~dieom/dieom/izwian2k7/Ian/God
 |
|
| Back to top |
|
 |
ladiko
Joined: 14 Jul 2006 Posts: 190 Location: Berlin
|
Posted: Sat Sep 08, 2007 12:12 am Post subject: |
|
|
is it also neccessary if it is the first gui that is created and there are controls added right after this?
later there will be a second gui to set settings, and to avoid problems from the point when 2 guis exist, i use 1: and 2: - but the +AlwaysOnTop is the very first gui-related command and so i thought it hasnt be specified for a special gui, cause it refers to the first gui that is created?!? |
|
| Back to top |
|
 |
Trikster
Joined: 15 Jul 2007 Posts: 1194 Location: Enterprise, Alabama
|
Posted: Sat Sep 08, 2007 5:32 am Post subject: |
|
|
The 1: is only need if it is on the show. i.e.:
| Code: | Gui, Add, Edit, W20,
Gui, Show
; This is no different then:
Gui, 1:Add, Edit, W20,
Gui, 1:Show |
_________________ ScriptPad/~dieom/dieom/izwian2k7/Ian/God
 |
|
| Back to top |
|
 |
ladiko
Joined: 14 Jul 2006 Posts: 190 Location: Berlin
|
Posted: Sat Sep 08, 2007 8:35 am Post subject: |
|
|
hmm i dont really understand how this could be an answer to my question oO
but i think the label is not neccessary at this point, cause if +AlwaysOnTop would not work, this would mean -Caption +ToolWindow would also not work, cause it is in the same command and so all 2 should be fail.
but the look of the window is correct like on the screenshots, it is only not on top of the others so i dont think that this "missing" label is the problem. |
|
| Back to top |
|
 |
Superfraggle
Joined: 02 Nov 2004 Posts: 904 Location: London, UK
|
Posted: Sat Sep 08, 2007 8:44 am Post subject: |
|
|
What i would do i use one of the scripts available to check if it still has its always on top status when it disapeers.
If its losing the always on top style you could just re add that every five mins or whenever, or there is probably a windows message to sepcify its style has changed, monitor that and reapply when that occurs. _________________ Steve F AKA Superfraggle
http://r.yuwie.com/superfraggle |
|
| Back to top |
|
 |
ladiko
Joined: 14 Jul 2006 Posts: 190 Location: Berlin
|
Posted: Sat Sep 08, 2007 9:17 am Post subject: |
|
|
but how is it possible that it loose its always on top style?
and which available script can check the style of a window?
i dont now what to search, but "window style" and doesnt think that one of search results hit my needs. |
|
| Back to top |
|
 |
Freighter
Joined: 07 Sep 2006 Posts: 64
|
Posted: Sat Sep 08, 2007 9:32 am Post subject: |
|
|
you could also make it reAlwaysOnTop it each time (before) you show the gui
Note:
you dont have to -Caption +ToolWindow again since they seem to be working fine
ps
if i missed the point sorry |
|
| Back to top |
|
 |
Freighter
Joined: 07 Sep 2006 Posts: 64
|
Posted: Sat Sep 08, 2007 9:52 am Post subject: |
|
|
| Code: | WinGet, ExStyle, ExStyle, Window Title or ahk_id %winhwnd%
if !(ExStyle & 0x8) ; 0x8 is WS_EX_TOPMOST. "&" is bitwise comparision
gui, 1:+AlwaysOnTop
return |
|
|
| Back to top |
|
 |
ladiko
Joined: 14 Jul 2006 Posts: 190 Location: Berlin
|
Posted: Sat Sep 08, 2007 10:53 am Post subject: |
|
|
like i told, the gui is shown by a hotkey so would it be enough to place
gui, 1:+AlwaysOnTop
in front of the
gui, 1:show
?
what is the difference to
WinSet , AlwaysOnTop , On , Window Title or ahk_id %winhwnd%
?
and what are reasons why a window can loose its alwaysontop window style? |
|
| Back to top |
|
 |
Trikster
Joined: 15 Jul 2007 Posts: 1194 Location: Enterprise, Alabama
|
Posted: Sat Sep 08, 2007 5:10 pm Post subject: |
|
|
Put the | Code: | | Gui, 1:+AlwaysOnTop | above the GUI code. And Below all the GUI stuff (but above the return) _________________ ScriptPad/~dieom/dieom/izwian2k7/Ian/God
 |
|
| Back to top |
|
 |
ladiko
Joined: 14 Jul 2006 Posts: 190 Location: Berlin
|
Posted: Sun Sep 09, 2007 2:54 am Post subject: |
|
|
it is! look at my starting post and yes it works for hours, but then sometimes not again. your answer is a correct answer, but not for my problem. thank you for trying to help me  |
|
| Back to top |
|
 |
|