名称 GetCursorPos 获得鼠标坐标
功能 获得操作系统桌面中的鼠标坐标。使用Open打开设备后才可以使用它。
参数 参数1 横坐标:变体型(32位整型数)地址。用于接收鼠标横坐标。
参数2 纵坐标:变体型(32位整型数)地址。用于接收鼠标纵坐标。
返回值 布尔值。成功返回true,失败返回false。
vbs
例子
Dim DevId,x,y
DevId=wyhkm.SearchDevice(&h1234&,&hABCD&,0)
If DevId=-1 Then
    MsgBox "未找到无涯键鼠盒子",4096
    wscript.quit
End If
If Not wyhkm.Open(DevId,0) Then
    MsgBox "打开无涯键鼠盒子失败",4096
    wscript.quit
End If
If Not wyhkm.GetCursorPos(x,y) Then
    MsgBox "获得鼠标坐标失败\n",4096
    wscript.quit
End If
MsgBox "鼠标坐标:"&CStr(x)&","&CStr(y),4096
wyhkm.Close