作者IOann (张昱珩)
看板EzHotKey
标题Re: [AHK-] 请问有办法抓到游标的座标,让滑鼠可以눠…
时间Tue Mar 23 16:22:20 2010
The current X and Y coordinates of the caret (text insertion point). The
coordinates are relative to the active window unless CoordMode is used to
make them relative to the entire screen. If there is no active window or the
caret position cannot be determined, these variables are blank.
The following script allows you to move the caret around to see its current
position displayed in an auto-update tooltip. Note that some windows (e.g.
certain versions of MS Word) report the same caret position regardless of its
actual position.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#Persistent ; 让程式持续执行
SetTimer, WatchCaret, 100 ; 每 0.1 秒执行一次 Label WatchCaret。
return ; 程式自动执行区段结束
WatchCaret: ; Label WatchCaret 开始
ToolTip, X%A_CaretX% Y%A_CaretY%, A_CaretX, A_CaretY - 20
; A_CaretX 是 input caret (键盘输入游标) 的 x 座标,类推 A_CaretY
return ; Label WatchCaret 终止
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
If the contents of these variables are fetched repeatedly at a high frequency
(i.e. every 500 ms or faster), the user's ability to double-click will
probably be disrupted. There is no known workaround.
搭配 MouseMove 函数使用:
http://tinyurl.com/y8rojk8
※ 引述《notlo (notlo)》之铭言:
: 请问有办法抓到游标的座标,让滑鼠可以移到该座标吗??
: 如题..
: 研究了一会,都不晓的怎麽抓游标(是游标不是鼠标)的座标,
: 不晓得有没有乡民可以指导一下的..
: 谢谢了..
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 114.42.74.223
1F:推 notlo:这位高人,谢谢您的帮忙,但我实在看不太懂,能帮我注解一下嘛? 03/24 01:08
ctrl+alt+z 将滑鼠移到输入游标 (但我测试後发现,在 firefox 中无效)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
^!z::
MouseMove, %A_CaretX%,%A_CaretY%
return
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
※ 编辑: IOann 来自: 123.192.91.167 (03/24 02:39)
2F:推 notlo:真是太谢谢你了,我弄出来了.. 03/24 18:03
※ 编辑: IOann 来自: 211.21.127.209 (07/30 20:25)