Page 1 of 1

Determine if mouse is over script-called menu/window =possible?

Posted: 16 Jul 2021 02:11
by eil
As i understood from help file it's possible to get position of mouse pointer, and even determine if it's over tree/list(though i'm not sure i understood it's correct). My question is if it's possible to call a window via XY script(say Inputselect() or popupmenu()) and determine if mouse pointer is over this particular element?
Basically i've got an idea for script, where such element appears with results of search, and if mouse doesn't get over it, close one after 3 seconds waiting.

Re: Determine if mouse is over script-called menu/window =possible?

Posted: 16 Jul 2021 07:43
by highend
On its own? Obviously not. Why? What does XY do after invoking a function like inputselect() / popupmenu()?
It waits for it to return so there is no: While I'm waiting for this I'll do a check every <x> milliseconds if something happened (apart from the fact that there is no inbuilt command to test if a context menu or inputselect window is open)

Call an external tool (that you have to write) before you display the window/menu that does the mouse pointer check and the appropriate action after the timeout...

Re: Determine if mouse is over script-called menu/window =possible?

Posted: 16 Jul 2021 13:25
by eil
@highend thanks for explanation, couldn't figure out all the aspects fully.