06-18-2015, 03:20 PM
Probably it is "cloaked". Or finds another cloaked window with same name.
Macro Macro2526
If you don't have IsWindowCloaked:
Function IsWindowCloaked
Macro Macro2526
int w=win("Start menu" "ImmersiveLauncher")
act w
int active(win=w) visible(IsWindowVisible(w)) cloaked(IsWindowCloaked(w))
out "active=%i visible=%i cloaked=%i" active visible cloaked
if cloaked
,cloaked=0
,if(DwmSetWindowAttribute(w 13 &cloaked 4)) out _s.dllerror ;;Try to uncloak. Error: Access is denied..
,If you don't have IsWindowCloaked:
Function IsWindowCloaked
function# hwnd
;Returns nonzero if the window is cloaked.
;Returns flags: 0 not cloaked, 1 cloaked by its application, 2 cloaked by Windows, 4 parent window is cloaked.
;REMARKS
;On Windows 8 and later, a window may be cloaked. Then it is invisible, although functions IsWindowVisible and hid say it is visible.
;On Windows 8, cloaked are inactive Windows store app windows. Also some inactive system windows, such as Start screen and Search.
;On Windows 10, cloaked are windows on inactive desktops. Also some system windows.
;Added in: QM 2.4.3.
if(_winver>=0x602 and !DwmGetWindowAttribute(hwnd 14 &_i 4)) ret _i