Xavier wrote: ↑10 Jun 2021, 15:33
Svengali wrote: ↑23 Oct 2020, 22:54
Why? Because I often want to display an interactive popup message or list of choices for the user at a specific screen location.
The way it works now, the message or list ALWAYS POPS UP with its upper-left corner on the X, Y position where the mouse was clicked (most often some where on the button just pressed).
If it were possible, in a script, to allow GEORGE to SET the mouse cursor to a specific place on the screen, then the upper-left corner of the popup message or list could be predictably and precisely placed at any specific place on the screen every time.
So, to renew an extremely old request: could we possibly add a new GEORGE command: tv_SetMouse X Y ?
sven
From the code I've checked, tv_getmouse returns (should return) the position of the cursor
WITHIN the picture, which is quite different from the coordinates you can see in the infobar, at the bottom left :
Capture d’écran_2021-06-10_15-23-15.png
If I properly understood your request, this is
not what you need. You'd rather need two new George functions :
- tv_GetScreenPosition would return the position of the mouse in the screen
- tv_SetScreenPosition sets the cursor position in the screen
Do you agree ?
Thanks for taking another look at this Xavier...
well, there are currently several commands that sort of return X,Y for the cursor location:
tv_WaitButton returns the LMB or RMB down and up plus the X,Y and I have used this for some user input in the past.
tv_GetMouse returns absolute X,Y (I think) for cursor location
Ideally, I think tv_GetScreenPosition and tv_SetScreenPosition would do exactly what I hoped, let the script place the "last" X,Y for the purpose of placing any of the following requests, not just for lists???
tv_listrequest "iEntries1|iEntries2|...|iEntriesn"
tv_reqnum iValue iMin iMax iTitle
tv_reqangle iValue iMin iMax iTitle
tv_reqfloat iValue iMin iMax iTitle
tv_reqstring ["multiline"] ["iTitle|iValue"]
tv_request "iText|[iYes|[iNo]]"
tv_warn iText
And while I'm wish listing here, another very useful user input option would be a check list where the script could show a stack of parameters where boxes could be checked and unchecked AND/OR new values could be entered, for multiple parameter/variables BEFORE closing the list. Now, that would be useful in all kinds of ways - and I would imagine be too complicated to do... in all kinds of ways!
Again, really appreciate this!
sven