ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > General Software Discussion

Determine if a window on top is active or not

(1/4) > >>

Contro:
I would like to know what is written in the windows registry or any other place to determine when and what window is on top of all the other ones.


Best Regards
 :-*

skwire:
Nothing is written to the registry to indicate if a window is on top or not.  It's what is called a window "style" or "property" and, again, it has nothing to do with the registry.

skwire:
Here's a short script that demonstrates how to find out if the active window is set for Always on Top.


--- Code: Autohotkey ---#1:: ; Win+1, change as necessary.{    WinGet, myStyle, ExStyle, A    If ( myStyle & 0x8 ) ; 0x8 is WS_EX_TOPMOST.    {        MsgBox, This window is set for Always on Top    }}Return

Contro:
Nothing is written to the registry to indicate if a window is on top or not.  It's what is called a window "style" or "property" and, again, it has nothing to do with the registry.
-skwire (January 12, 2014, 03:57 PM)
--- End quote ---
Understood

Contro:
I am using this code , but don't give me results.
What am i doing bad ?
Must have I the top windows maximized ?
Best Regards


--- ---#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Recommended for catching common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
^#1:: ; Control+Win+1, change as necessary.
{
   WinGet, myStyle, ExStyle, A
   If ( myStyle & 0x8 ) ; 0x8 is WS_EX_TOPMOST.
   {
       MsgBox, This window is set for Always on Top
   }
}
Return

Navigation

[0] Message Index

[#] Next page

Go to full version