Highlighted

get mouse cursor x and y location in script

New Here ,
Apr 21, 2020

Copy link to clipboard

Copied

Hi,

I'm doing scripting for a small tool with a UI. I have bound it with a shortcut key. I'm using these lines to position the window and show the window,

myToolsPanel.frameLocation = [50, 150];
myToolsPanel.show();

now i need to get the cursor x and y coordinates, so that I can pass it to 'myToolsPanel.frameLocation' using a variable.

I'm new to scripting tools. I couldnt find any references on web.

need help to get cursor x and y coordinates inside the script.

TOPICS
Error or problem, Expressions, FAQ, How to, Scripting, SDK, User interface or workspaces

Views

220

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

get mouse cursor x and y location in script

New Here ,
Apr 21, 2020

Copy link to clipboard

Copied

Hi,

I'm doing scripting for a small tool with a UI. I have bound it with a shortcut key. I'm using these lines to position the window and show the window,

myToolsPanel.frameLocation = [50, 150];
myToolsPanel.show();

now i need to get the cursor x and y coordinates, so that I can pass it to 'myToolsPanel.frameLocation' using a variable.

I'm new to scripting tools. I couldnt find any references on web.

need help to get cursor x and y coordinates inside the script.

TOPICS
Error or problem, Expressions, FAQ, How to, Scripting, SDK, User interface or workspaces

Views

221

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Apr 21, 2020 0

Have something to add?

Join the conversation