Thank you, Gintaras!
Here's the corrected macro, hope this will be helpful for someone:
Macro ToggleActiveWindowZOrder
Trigger W0
Somehow, I overlooked this Find help, functions, tools field, and never used it, I only used QM help file.
But the help file doesn't list every single QM feature, because there are a lot of inbuilt functions in the System folder, which are not described in the Help.
Still, they all can be found using this search field.
Thank you for this extremely powerful application!
Here's the corrected macro, hope this will be helpful for someone:
Macro ToggleActiveWindowZOrder
Trigger W0

str functionPrefix
str programName
outw win functionPrefix programName
programName.replacerx("^.*'' " "")
if (GetWinStyle(win 1)&WS_EX_TOPMOST)
,Zorder win HWND_NOTOPMOST
,OnScreenDisplay F"''{programName}'' window: Normal" 1 -50 -50 "Calibri" 0 0xFF0000 2 ;;vbBlue;
else
,Zorder win HWND_TOPMOST
,OnScreenDisplay F"''{programName}'' window: Topmost" 1 -50 -50 "Calibri" 0 0xFF 2 ;;vbRed;Somehow, I overlooked this Find help, functions, tools field, and never used it, I only used QM help file.
But the help file doesn't list every single QM feature, because there are a lot of inbuilt functions in the System folder, which are not described in the Help.
Still, they all can be found using this search field.
Thank you for this extremely powerful application!

Convert window handle to window name/class