gpt4 book ai didi

macos - Mac Automator/AppleScript : Is there a way to refer to Variables within AppleScript?

转载 作者:行者123 更新时间:2023-12-04 21:45:51 31 4
gpt4 key购买 nike

我在互联网上看到了很多与此相关的问题,但没有答案。有没有办法在 AppleScript 中引用 Automator“变量”?我想作为工作流程的一部分进行一些字符串操作。我已经通过使用 Get Variable 并将它们传递到临时文件中来解决这个问题,但这有点难看。

最佳答案

我正在尝试与史蒂文相同的方法。我的结论是,当您在“Automator”应用程序内运行流程时,您的 applescript 可以通过 Apple 脚本“Automator Suite”界面访问 Automator 变量。例如:

set my_variable to value of variable "The Variable" of workflow 0 of current application
display dialog my_variable as text
set my_variable to "Test"

但是,如果您将流程保存为独立应用程序,那么它不会将“Automator Suite”包含到应用程序中,因此上述脚本将不再起作用:-(

关于macos - Mac Automator/AppleScript : Is there a way to refer to Variables within AppleScript?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3866873/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com