更改光标指针的 dm 脚本命令

dm-script command to change cursor pointer

是否有DM脚本命令来改变光标指针?我的程序以某种方式将光标更改为 "Rectangle ROI" 的叉号。我需要想办法通过命令让光标脱离ROI模式,也就是回到箭头选择指针。

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

你是怎么变成这样的?如果它是“常规使用”,它很可能是一个值得在 Gatan 网页上报告的错误:

否则,我可以想象由 SDK 开发的 custom-plugin(即 plugins-folder 中的自定义 .dll)或更改整体 OS 设置可能会影响显示的光标。你查过这个吗?


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

对于脚本,每个工具都是一个数字 'ID',可用于设置工具。相应的命令是:

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

我没有测试过,但 GMS 3 和更早的 GMS 版本之间的命令行为(可能还有确切的工具 ID 值)可能有所不同。