AutoHotkey Community

It is currently May 27th, 2012, 10:27 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: September 7th, 2007, 7:45 pm 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
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)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 7th, 2007, 11:49 pm 
Offline

Joined: July 15th, 2007, 1:43 am
Posts: 1320
Is the GUI label 1? If so, you need

Code:
Gui, 1:+LastFound +AlwaysOnTop -Caption +ToolWindow

_________________
Religion is false. >_>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2007, 12:12 am 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
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?!?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2007, 5:32 am 
Offline

Joined: July 15th, 2007, 1:43 am
Posts: 1320
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

_________________
Religion is false. >_>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2007, 8:35 am 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2007, 8:44 am 
Offline

Joined: November 2nd, 2004, 2:43 pm
Posts: 1019
Location: London, UK
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2007, 9:17 am 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
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.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2007, 9:32 am 
Offline

Joined: September 7th, 2006, 10:42 am
Posts: 65
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2007, 9:52 am 
Offline

Joined: September 7th, 2006, 10:42 am
Posts: 65
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2007, 10:53 am 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
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?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 8th, 2007, 5:10 pm 
Offline

Joined: July 15th, 2007, 1:43 am
Posts: 1320
Put the
Code:
Gui, 1:+AlwaysOnTop
above the GUI code. And
Code:
Gui, 1:Show
Below all the GUI stuff (but above the return)

_________________
Religion is false. >_>


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 9th, 2007, 2:54 am 
Offline

Joined: July 14th, 2006, 12:31 am
Posts: 290
Location: Berlin
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 :-)


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], chaosad, robotkoer, specter333, Yahoo [Bot] and 67 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