效果展示
安装autohotkey,创建.ahk
文件,写入示例代码,双击启动脚本即可。
示例 1
SetTimer WatchCursor, 10
WatchCursor() {
MouseGetPos &xpos, &ypos
ToolTip("鼠标位置:" "(" xpos "," ypos ")")
}
示例2
可以用热键Ctrl Shift M
启用/关闭:
isTimerRunning := false
; Ctrl Shift M
^+M:: {
global isTimerRunning
if (isTimerRunning) {
SetTimer WatchCursor, 0
ToolTip
isTimerRunning := false
} else {
SetTimer WatchCursor, 10
isTimerRunning := true
}
}
WatchCursor() {
MouseGetPos &xpos, &ypos
ToolTip("(" xpos "," ypos ")")
}