need little script to get cursor x,y values in photoshop?

I’m trying to put the current x,y values of the cursor in a pair of text boxes when I click anywhere on an image in Photoshop CS. I can’t seem to find references to Photoshop’s “measure” tools for scripting, nor a simple way to find these cursor values? Can anyone help?

java/applescript?

fermi

Theres probably a much better way to do this but a quick and dirty method that Ive been using involves incorporating ‘Scripting Additions’ into your project. You probably already know all about them, but in the advent you don`t why not check out the thread ‘A Cursor/Mouse Question’
http://bbs.applescript.net/viewtopic.php?p=30696&highlight=#30696
and
http://macscripter.net/faq/scripting_additions.php
for more info.
The “XTool.osax” found at
http://www.osaxen.com/xtool.html
has a cursor location command.

Basically it would involve having your ASStudio app active over an open Photoshop file. You would then put your cursor over the disired spot and after clicking the mouse your ASStudio app would pick up the x & y values and then input them into the desired text boxes.

If anyone has a better approach/idea, please let us know.

Hope this helps.