Page 1 of 1

A script which detects Text Area irrespective of editor/type of window?

Posted: 28 Mar 2024, 02:04
by iamMG
Hi all. Is there a general script/library/function that is able to detect when the user has focus on a text edit field/area (such as the one I am typing this post into, or browser URL bar, or Notepad, etc.)?
I found this post which most probably worked for v1: viewtopic.php?p=277097#p277097.
I converted it to v2: viewtopic.php?p=564595#p564595 but it not working.

Re: A script which detects Text Area irrespective of editor/type of window?

Posted: 28 Mar 2024, 08:16
by eugenesv
You could try the static get⎀(&⎀←,&⎀↑,&⎀↔:=0,&⎀↕:=0) { ; true if caret is visible and text is editable function that I'm using in my mouse pointer hiding script using this Win.ahk library that relies among other thigs on UIA automation library (all libraries are part of the linked repo)