问题描述
是否可以按住lua中的键,例如“ a”?我的意思不是用doKeyPress(VK_A)按下键,然后循环播放,但实际上按住了一定时间。
解决方法
您想要的是keyDown()
。
https://wiki.cheatengine.org/index.php?title=Lua:keyDown
您最终将要执行keyUp()
命令来释放它。
https://wiki.cheatengine.org/index.php?title=Lua:keyUp
通过触发事件(您自己的按键或鼠标单击)
或在指定时间后使用计时器将keyUp()设置为
编辑:
https://wiki.cheatengine.org/index.php?title=Lua:sleep
keyDown(VK_A)
睡眠(5000)
keyUp(VK_A)