求一个把鼠标在屏幕固定位置的点击,映射到键盘的 AutoHotKey 脚本。
用BlueStacks运行腾讯的天天酷跑在电脑上完,但是因为是安卓游戏,使用触摸屏幕操作,安装BlueStacks上以后,变成用鼠标点击。所以想到把鼠标点击映射成键盘点击...
用 BlueStacks 运行腾讯的天天酷跑在电脑上完,但是因为是安卓游戏,使用触摸屏幕操作,安装 BlueStacks 上以后,变成用鼠标点击。
所以想到把鼠标点击映射成键盘点击,还要固定鼠标的位置,我是 AutoHotKey 新手,所以请高手帮忙写一个脚本,
具体实现其实就是:
当按下键盘的 z 键,鼠标在软件窗口坐标(462,600)按下鼠标左键
当松开键盘的 z 键,鼠标在软件窗口坐标(462,600)松开鼠标左键
当按下键盘的 ↑ 键,鼠标在软件窗口坐标(562,600)按下鼠标左键
当松开键盘的 ↑ 键,鼠标在软件窗口坐标(562,600)松开鼠标左键
BlueStacks 的 AutoIt3 Window Spy 信息如下:
=======================================================
>>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
BlueStacks App Player for Windows (beta-1)
ahk_class WindowsForms10.Window.8.app.0.33c0d9d
>>>>>>>>>>>>( Mouse Position )<<<<<<<<<<<<<
On Screen: 983, 446 (less often used)
In Active Window: 559, 273
>>>>>>>>>( Now Under Mouse Cursor )<<<<<<<<
ClassNN: BlueStacksApp1
Text: _ctl.Window
Color: 0x000000 (Blue=00 Green=00 Red=00)
>>>>>>>>>>( Active Window Position )<<<<<<<<<<
left: 424 top: 173 width: 1126 height: 676
>>>>>>>>>>>( Status Bar Text )<<<<<<<<<<
>>>>>>>>>>>( Visible Window Text )<<<<<<<<<<<
Suggested Apps
_ctl.Window
>>>>>>>>>>>( Hidden Window Text )<<<<<<<<<<<
>>>>( TitleMatchMode=slow Visible Text )<<<<
>>>>( TitleMatchMode=slow Hidden Text )<<<<
======================================================= 展开
所以想到把鼠标点击映射成键盘点击,还要固定鼠标的位置,我是 AutoHotKey 新手,所以请高手帮忙写一个脚本,
具体实现其实就是:
当按下键盘的 z 键,鼠标在软件窗口坐标(462,600)按下鼠标左键
当松开键盘的 z 键,鼠标在软件窗口坐标(462,600)松开鼠标左键
当按下键盘的 ↑ 键,鼠标在软件窗口坐标(562,600)按下鼠标左键
当松开键盘的 ↑ 键,鼠标在软件窗口坐标(562,600)松开鼠标左键
BlueStacks 的 AutoIt3 Window Spy 信息如下:
=======================================================
>>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
BlueStacks App Player for Windows (beta-1)
ahk_class WindowsForms10.Window.8.app.0.33c0d9d
>>>>>>>>>>>>( Mouse Position )<<<<<<<<<<<<<
On Screen: 983, 446 (less often used)
In Active Window: 559, 273
>>>>>>>>>( Now Under Mouse Cursor )<<<<<<<<
ClassNN: BlueStacksApp1
Text: _ctl.Window
Color: 0x000000 (Blue=00 Green=00 Red=00)
>>>>>>>>>>( Active Window Position )<<<<<<<<<<
left: 424 top: 173 width: 1126 height: 676
>>>>>>>>>>>( Status Bar Text )<<<<<<<<<<
>>>>>>>>>>>( Visible Window Text )<<<<<<<<<<<
Suggested Apps
_ctl.Window
>>>>>>>>>>>( Hidden Window Text )<<<<<<<<<<<
>>>>( TitleMatchMode=slow Visible Text )<<<<
>>>>( TitleMatchMode=slow Hidden Text )<<<<
======================================================= 展开
1个回答
展开全部
给你一个我刚写的脚本。勉强实现功能~~
同新手,同学习~(我是用df来操作的~)
#IfWinActive, BlueStacks App Player for Windows (beta-1)Loop{ ifWinActive, BlueStacks App Player for Windows (beta-1) isGameWindows:=true else isGameWindows:=false sleep,10if (isGameWindows) { if (GetKeyState("d")) { DllCall("SetCursorPos", int, 200, int, 300) sleep 10 click down } else { if (GetKeyState("LButton")) click up }}}*f::{ DllCall("SetCursorPos", int, 1000, int, 300) sleep 10 click} #IfWinActive
同新手,同学习~(我是用df来操作的~)
#IfWinActive, BlueStacks App Player for Windows (beta-1)Loop{ ifWinActive, BlueStacks App Player for Windows (beta-1) isGameWindows:=true else isGameWindows:=false sleep,10if (isGameWindows) { if (GetKeyState("d")) { DllCall("SetCursorPos", int, 200, int, 300) sleep 10 click down } else { if (GetKeyState("LButton")) click up }}}*f::{ DllCall("SetCursorPos", int, 1000, int, 300) sleep 10 click} #IfWinActive
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询