獲取當(dāng)前鼠標(biāo)的坐標(biāo)位置。
MouseGetPos ( )
參數(shù)
無
返回值
返回含有兩個(gè)元素的 數(shù)組,分別保存著x和y坐標(biāo)值:
注意
請查看 MouseCoordMode 了解關(guān)于 相對位置/絕對位置 的說明。若設(shè)置為相對位置則坐標(biāo)值可使用負(fù)數(shù)。
相關(guān)
MouseClick, MouseClickDrag, MouseMove, MouseCoordMode(選項(xiàng))
示例
$pos = MouseGetPos()
MsgBox(0, "當(dāng)前鼠標(biāo)的 x 和 y 坐標(biāo)分別是:", $pos[0] & "," & $pos[1])