作者mesak (米沙)
看板EzHotKey
标题[AHK-] 抓取目前视窗座标
时间Sat May 28 02:27:31 2011
请问该如何 取得 目前视窗 的相对座标
也就是 Windows Spy 的 In Active Window
#C::
;ControlClick, x1214 y128 , %active_title% , , , , NA
;MouseGetPos, xpos, ypos
WinGetPos, X, Y, Width, Height, Calculator
MsgBox, Calculator is at %X%`,%Y%
ArrayCount += 1 ; Keep track of how many items are in the array.
ArrayX%ArrayCount% = %X% ; Store this line in the next array element.
ArrayY%ArrayCount% = %Y%
Return
不知道为什麽这样取出来的数值都怪怪的
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 112.104.133.246
1F:→ fossil313:因为组合得太奇怪了...大概只需要mousegetpos 05/28 09:04