lua - 尝试在 Lua 脚本上调用 nil 值
问题描述
我想创建一个简单的脚本,在罗技游戏软件中通过 Lua 不断单击鼠标左键。但是,它一直在“EnablePrimaryMouseButtonEvents (true)”行上说“尝试调用 nil 值”这是我的脚本:
EnablePrimaryMouseButtonEvents (true)
function OnEvent(event, arg)
if IsKeyLockOn("scrolllock") then
if IsMouseButtonPressed(1) then
repeat
PressMouseButton(1)
Sleep(15)
until not IsMouseButtonPressed(1)
end
end
end
解决方案
推荐阅读
- r - 根据来自选择输入的多个值过滤表并以闪亮的方式呈现
- microsoft-teams - MS Teams:使用“另存为”选项进行协作
- jquery - AJAX 回调不起作用,但正在发送数据
- html - 如何制作相同大小的Angular mat-card列表
- joomla - 如何通过IP地址限制访问joomla中的特定文章?
- spring - Spring Data:示例查询和转换器
- tensorflow - 使用 from_generator 创建的 TensorFlow 数据集未按 batch_size 迭代
- .net - .net 框架 4.5.2 的 HyperPropertyDescriptor 问题
- algorithm - 算法:10个城市之间的最短旅行路线
- apache-kafka - Pycapa 到 kafka 主题 - 虚假或未解码的字符