【问题标题】:script is not allowed to send keystorke不允许脚本发送击键
【发布时间】:2022-01-17 18:35:58
【问题描述】:

Applescript 不允许发送击键 是我的错误

我的脚本是

set texttowrite to "[ep] t [ef] t [ed] t [ed] [ts] [ed] t [ed]"
tell application "Roblox" to activate
tell application "System Events"
    repeat with i from 1 to count characters of texttowrite
        keystroke (character i of texttowrite) 
        delay 0.08
    end repeat
end tell

keystroke (character i of texttowrite) 部分不工作

【问题讨论】:

  • Stack 标签推荐系统当然是不完善的。 在提交问题之前查看推荐的标签:我发现R programming languager标签所引用的标签没有任何联系(坦率地说,我发现performance可能不相关)。
  • 如果我用“TextEdit”代替“Roblox”,脚本就可以工作。它确实重复了最后一个字符我一次。这是一个非常低效的脚本。我猜重点是在某些游戏上作弊,但可能有更聪明的方法来设计脚本。

标签: applescript keystroke


【解决方案1】:
  1. 转到 系统偏好设置 --> 安全和隐私 --> 辅助功能
  2. 在启用以控制您的计算机的应用程序列表中找到应用程序“Roblox”。
  3. 设置其复选框。

现在,您可以随时将击键发送到 Roblox.app。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-07-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-27
    • 2023-03-31
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多