|
使用笨办法, 但是屏幕老晃动, 很费劲 . 应该有更好的解决办法的. 谢谢 ......... Magnifixer.exe是屏幕放大镜 .
$tt='中国象棋角色版'
$tt2='屏幕放大镜'
WinActivate($tt)
$Handle = WinGetHandle($tt)
While 1
$pos = MouseGetPos()
Sleep ( 100 )
If _IsPressed("01", $dll) And ProcessExists ( "Magnifixer.exe" ) And $pos[0]>4 And $pos[0]<845 And $pos[1]>5 And $pos[1]<990 Then
$pos = MouseGetPos()
; $Handle = WinGetHandle($tt)
If WinExists('屏幕放大镜') Then WinMove('屏幕放大镜','',0,-2,865,990,1)
WinSetState ($tt2, "", @SW_HIDE ); @SW_MINIMIZE
; WinActivate($tt)
MouseClick('left', Round( ($pos[0]-30)/2+355, 0) , Round( ($pos[1]-30)/2+240, 0), 1, 0);
; _MouseClick($Handle, $pos[0]+8 , $pos[1]+22, 'left', 1);
; MsgBox(0, "鼠标坐标 X,Y:", $pos[0] & "," & $pos[1],1)
;MouseMove( Round( ($pos[0]-55)/2+355, 0) , Round( ($pos[1]-5)/2+240, 0),0)
WinSetState ($tt2, "", @SW_SHOW ); @SW_RESTORE
If WinExists('屏幕放大镜') Then WinMove('屏幕放大镜','',0,-2,865,990,1)
If $pos[0]>4 And $pos[0]<845 And $pos[1]>5 And $pos[1]<990 Then MouseMove( $pos[0] , $pos[1] , 0)
EndIf
WEnd
DllClose($dll) |
|