CoordMode Mouse ;鼠标相对移动 F1:: X := 100 ; 正数转向右,负数去左边 Y := 100 ; 正数往下下降,负数上涨 DllCall("mouse_event", "Uint", 0x01, "int", X, "int", Y, "Uint", 0, "int", 0) return 偏移x := X-960 偏移y := Y-540 DllCall("mouse_event", "Uint", 0x01, "int", 偏移x, "int", 偏移y) F2::DllCall("mouse_event", "Uint", 0x01, "int", 0, "int", 20) F3:: MouseGetPos, _x, _y, id, 控件类名 x := 100-960 y := 100-540 DllCall("mouse_event", "Uint", 0x01, "int", x, "int", y) ; x-200 是向左-200 return F4::MouseMove, 960, 540, 0 ; 绝对坐标移动 坐标960, 540是1080p的中心 DllCall("mouse_event", "Uint", 0x8000 | 0x01, "int", 960 * 65535 / A_ScreenWidth * A_ScreenDPI/96, "int", 540 * 65535 / A_ScreenHeight * A_ScreenDPI/96 ) ; 乘除会有小数点 ; DllCall("mouse_event", "Uint", 0x8000 | 0x01, "int", 960 * 65535 / A_ScreenWidth, "int", 540 * 65535 / A_ScreenHeight) DllCall("mouse_event", "Uint", 0x01 , "Uint", x, " Uint", y) ; DIICall("mouse event", "Uint", 0x01 , "Uint", dx, "Uint", dy, "Uint", 0, "UPtr", 0) DllCall("mouse_event", "Uint", 0x01, "int", 0, "int", recoil_offset, "Uint", 0, "int", 0) MsgBox % 65535 / A_ScreenWidth " "" " 65535 / A_ScreenHeight
声明:站内资源为整理优化好的代码上传分享与学习研究,如果是开源代码基本都会标明出处,方便大家扩展学习路径。请不要恶意搬运,破坏站长辛苦整理维护的劳动成果。本站为爱好者分享站点,所有内容不作为商业行为。如若本站上传内容侵犯了原著者的合法权益,请联系我们进行删除下架。
评论(0)