Josh_147
5 years agoContributor
How to get the FullName of current focus/VisibleOnScreen window?
Hi all, In VBScript, we used to hard-coded the parameter like this: Set sDlg = Sys.Process("notepad").Window("Notepad", "New Text Document.txt - Notepad", 1) Instead of hard-coded it, can we...
- 4 years ago
Hi,
Something like this (untested pseudocode):
arWindows = <process>.FindAllChildren("WndClass", "*", 1).toArray(); // top-level children var strFullName = ''; if (arWindows.length > 0) { for (var i = 0; i < arWindows.length; i++) if (arWindows[i].Focused) { strFullName = arWindows[i].FullName; break; } }