这里是我的脚本:无法获得ControlGet工作
ControlGet, Output, Hwnd,,, ahk_id TV_REMOTEDESKTOP_CLASS1
MsgBox %Output%
PostClick(%Output%, 1170, 305, 10, 50)
PostClick(hwnd, X, Y, Count, Delay)
{
p := y << 16 | (x & 0xffff)
Loop, %Count% {
PostMessage, 0x201, 1, p, , ahk_id %hwnd%
If (Delay)
Sleep Delay
PostMessage, 0x202, 0, p, , ahk_id %hwnd%
If (Delay)
Sleep Delay
}
}
我不能得到它的工作! 我想让它点击X Y pos,在一个不可见/没有移动鼠标的程序中。
我可以使用点击,但我不得不打开程序,它会移动鼠标到每次点击。 http://www.autohotkey.com/board/topic/35742-postmessage-click-useful-hwnd-clicker/
我不确定如何做到这一点:从
PostClick功能。
编辑:
ControlGet, chwnd, Hwnd,,, ahk_id TV_REMOTEDESKTOP_CLASS1
PostClick(chwnd, 1223, 395, 10, 50)
PostClick(hwnd, X, Y, Count, Delay)
{
p := y << 16 | (x & 0xffff)
Loop, %Count% {
PostMessage, 0x201, 1, p, , ahk_id %hwnd%
If (Delay)
Sleep Delay
PostMessage, 0x202, 0, p, , ahk_id %hwnd%
If (Delay)
Sleep Delay
}
}
是我的新代码。 (试过某人的脚本) 我的鼠标位置根据au3_spy:
在活动窗口:1223,395 屏幕:1136,398
您好。我编辑了我的帖子,并添加了一些。 – prk
我如何获得顶角坐标等。 – prk
可能是控制大声笑。因为在“窗口标题和类”下,ahk_class是TV_CClientWindowClass - ClassNN是REMOTEDESKTOP thingy。 – prk