检索全局光标的信息
#Include <WinAPI.au3>
_WinAPI_GetCursorInfo()
成功: | 返回数组的格式如下: | |
$aCursor[0] - True | ||
$aCursor[1] - 返回 True, 则光标显示,否则返回 False | ||
$aCursor[2] - 光标句柄 | ||
$aCursor[3] - 光标 X 坐标 | ||
$aCursor[4] - 光标 Y 坐标 | ||
失败: | 设置@error |
在MSDN中搜索
#include <WinAPI.au3>
_Main()
Func _Main()
Local $cursor, $text
$cursor = _WinAPI_GetCursorInfo()
$text = "Was the operation sucessful? " & $cursor[0] & @LF
$text &= "Is the cursor showing? " & $cursor[1] & @LF & @LF
$text &= "Cursor Handle: " & $cursor[2] & @LF
$text &= "X Coordinate: " & $cursor[3] & @LF
$text &= "Y Coordinate: " & $cursor[4]
MsgBox(0, "_WinApi_GetCursorInfo Example", $text)
EndFunc ;==>_Main