user6406828
user6406828

Reputation: 11

dm-script command to change cursor pointer

Is there a DM script command to change cursor pointer? Somehow my program changed the cursor to the cross for "Rectangle ROI". I need to find a way to get the cursor out of ROI mode through command, that is, back to the arrow selection pointer.

Upvotes: 0

Views: 304

Answers (1)

BmyGuest
BmyGuest

Reputation: 2949

No, as far as I know, mouse-cursors cannot be addressed by DM scripting.

How did you end up in your situation? If it was by "regular use" it might well be a bug worth reporting at the Gatan webpage:

Otherwise, I could imagine that either a custom-plugin developed by the SDK (i.e. a custom .dll in the plugins-folder) or changes with your overall OS setting could influence the displayed cursor. Have you checked this?


There are script commands to change the currenlty active tool.

DM knows two types of set tool:

  • The current tool: This is the currenlty active tool, i.e. what the mouse will do
  • The default tool: This is the tool to which the cursor will return once the currenlty active tool has finished its action

In GMS 3+ one sets
the current tool: by selecting it with the left-click mouse button from the right-click menu tool bar
the default tool : by keeping the ALT key pressed while selecting the tool as above

In GMS 1 & 2 one sets
the current tool: by selecting it with the left-click mouse button from the tool bar
the default tool : by selecting it with the left-double-click mouse button from the tool bar

For scripting, each tool as a numeric 'ID' which can be used to set the tool. The according commands are:

Number GetCurrentToolID(  )
Number GetDefaultToolID(  )
void SetDefaultToolByID( Number toolID )
void SetCurrentToolByID( Number toolID )
void RevertToDefaultTool(  )

I have not tested it, but it is likely that the behaviour of the commands - and maybe also the exact tool ID values - differ between GMS 3 and earlier GMS versions.

Upvotes: 0

Related Questions