【问题标题】:Applescript will not run in automatorApplescript 不会在自动机中运行
【发布时间】:2014-03-03 08:39:20
【问题描述】:

这是我拥有的代码,除此之外,目前自动化程序中没有其他内容。

on run {input, parameters}

delay 0.5

activate application "Firefox"

set x to 1
set counter to 0

repeat while (counter < x)
    tell application "System Events" to key code 126
    set counter to counter + 1
end repeat

set x to x + 1

return input
end run

我运行时遇到的错误是:

“执行 AppleScript”操作遇到错误。
检查操作的属性并尝试再次运行工作流。

【问题讨论】:

    标签: applescript automator


    【解决方案1】:

    要么摆脱(未使用/不必要的)参数和返回行,要么完全摆脱运行块。你正在做的事情不需要任何这些。以后是否需要“输入”和其他参数是另一个问题。但这只是在 FireFox 中输入向上箭头。

    activate application "Firefox"
    
    set x to 1
    set counter to 0
    
    repeat while (counter < x)
       tell application "System Events" to key code 126
       set counter to counter + 1
    end repeat
    
    set x to x + 1
    

    【讨论】:

    • 我以前试过这个,但我得到了这些错误:“执行 Applescript”操作没有提供所需的数据。和。没有电脑。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-07-16
    • 2015-06-05
    • 2013-10-08
    • 1970-01-01
    • 1970-01-01
    • 2015-07-10
    • 2015-02-04
    相关资源
    最近更新 更多