How to get current position of mouse cursor?

I have this Layout I have in mind, I need to bring it to a specific position as soon as it is created (Current screen cursor is on is not enough)

Below example works really well. But I need the coordinates to be controlled by the mouse. How can I best go about achieving this WITHIN opus? Thanks!

Prefs LAYOUT="Read_Write Dialog..."
Set LISTERPOS=0,0

So you want the layout to open in a different position each time you open it, based on where the mouse is each time? Similar to the option for the Default Lister?

Or do you just want to save the layout in a specific place?

Yes, exactly this. Now that you mention it, the default lister does this!

If you need it for more than just the Default Lister, we could add a scripting helper to get the current mouse position.

(There may be a way to get it using simple commands as well, but I need to check in more detail.)

In fact, there already is one, so you should have all you need:

https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Scripting/SysInfo.htm

Oh man this is excellent. Thank allot Leo.

1 Like