Skip to main content
Participating Frequently
June 23, 2011
Question

current cursor position

  • June 23, 2011
  • 2 replies
  • 3621 views

Is it possible to get somehow current cursor position with jsx script. I know that it's shown in Control Panel as X position and Y position values, but I can't find function to retrive those values.

Thanks

This topic has been closed for replies.

2 replies

oblakoidAuthor
Participating Frequently
July 2, 2011

Stil searching how to retrieve mouse coordinates... actualy current mouse pointer coordinates inside of spread. They are shown in panel while mouse is moving. How to capture those valuse. Any idea???

Peter Kahrel
Community Expert
Community Expert
July 3, 2011

The only way to capture the mouse cursor's position with a script is using ScriptUI. But even that is probably not good for you, as in ScriptUI you can capture the mouse cursor's position only when you move the mouse. I don't think you can get that position when you start a script. You'll need a plugin for that.

Peter

oblakoidAuthor
Participating Frequently
July 3, 2011

Thank you Peter,

I was affraid of that.

Jongware
Community Expert
Community Expert
June 23, 2011

The "InsertionPoint" properties baseLine and horizontalOffset may provide this information.

Keep in mind that 'shown in Control Panel' does not equal "being able to read by scripting". The Control Panel is not made with a script.

oblakoidAuthor
Participating Frequently
June 23, 2011

Yes I know that. What I would like to get is values X and Y of mouse cursor. I tought that it's maybe possible to get those values since they are showen in panel as you move mouse.