UiPath Documentation
activities
latest
false
生产力活动
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

调用 Apple 脚本

“调用 Apple 脚本”活动,该活动调用 Apple 脚本并返回其输出。

UiPath.AppleScripting.Activities.InvokeAppleScript

描述​

调用 Apple 脚本并返回其输出。

此活动在 macOS 系统上执行 AppleScript 代码并返回输出。您可以将脚本作为内联内容提供,也可以通过指定脚本文件的文件路径来提供。该活动支持超时配置,并提供在脚本失败时引发异常的选项,即以非零代码退出。AppleScript 是 macOS 上一种功能强大的脚本语言,可以自动执行任务并控制应用程序。

备注:

此包仅在 macOS 系统上运行。

项目兼容性​

Windows | 跨平台

配置​

您可以按如下方式配置活动及其属性:

  • Path to script file - The path of the file which contains the AppleScript to execute.
    • Use content - Select this option to switch to Script content, where you can provide the content of the AppleScript to execute.
  • Script content - The content of the AppleScript to execute.
    • Use local file - Select this option to switch back to Path to script file.
  • Arguments - An ordered list of strings passed as positional arguments to the script's on run argv handler. Every value arrives as AppleScript text; coerce to numbers or booleans inside the script if needed.
备注:
  • The activity supports only the .scpt and .scptd file extensions, and the script (inline content or file) must be 1 MB or smaller.
  • 有关加号菜单选项的更多详细信息,请查看设计自动化。

属性面板​

  • 失败时引发- 选择True或False 。默认情况下,此选项设置为True 。如果设置为True ,则当脚本的退出代码不是0时,该活动将引发异常。异常中包含的消息将是标准错误流的内容。
  • 超时(毫秒) - 指定最长等待时间(毫秒),如果超出该时间后活动并未运行,系统便会抛出错误。留空则无限期等待。
  • “结果” - 脚本调用的结果。
  • 描述​
  • 项目兼容性​
  • 配置​
  • 属性面板​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新