首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >鼠标右键+鼠标左键

鼠标右键+鼠标左键
EN

Stack Overflow用户
提问于 2022-10-10 02:01:09
回答 2查看 170关注 0票数 -4

有人帮我一些罗技或自动热键脚本,在那里按下鼠标右键,它也按下鼠标左键,这将持续到我释放鼠标右键!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2022-10-10 02:53:33

这是罗技的剧本。

CapsLock发光二极管必须开着。

代码语言:javascript
运行
复制
local LMB_pressed

function OnEvent(event, arg)
   if event == "MOUSE_BUTTON_PRESSED" and arg == 2 and IsKeyLockOn("capslock") then
      PressMouseButton(1)
      LMB_pressed = true
   elseif event == "MOUSE_BUTTON_RELEASED" and arg == 2 and LMB_pressed then
      LMB_pressed = false
      ReleaseMouseButton(1)
   elseif event == "PROFILE_DEACTIVATED" then
      ReleaseMouseButton(1)
   end
end
票数 0
EN

Stack Overflow用户

发布于 2022-10-10 16:48:41

AHK脚本:

代码语言:javascript
运行
复制
~RButton::
    while GetKeyState("RButton")
        click
return

; Press F1 to disable/reanable the hotkey
F1:: Suspend 

; Press F2 to exit the script
F2:: ExitApp

请参阅同时循环

编辑

如果click在游戏中不起作用,试着用SendPlay {click}SendPlay {LButton}代替它。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74009620

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档