0

I'm trying to set a variable using AppleScript from automator:

    do shell script "launchctl setenv LASTMAX \"" & today & "\""

I have a variable today that i want to assign to the variable LASTMAX

but when i check the property with echo $LASTMAX i keep getting the initial value, even after i reboot.

How can i set variables with AppleScript?

Is there a different way to store persistant variables with automator?

Thanks!

4

1 回答 1

1

您可以使用脚本对象将数据存储在不碍事的地方。 Automator 中的持久变量存储

存储脚本似乎只在第一次工作。

当我将上面引用的脚本粘贴到 Automator 工作流程中并多次运行该工作流程时,每次运行脚本时返回的值都会增加一。请发布您的代码。

于 2013-04-14T13:43:22.233 回答