Reputation: 3565
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!
Upvotes: 0
Views: 380
Reputation: 11238
You can use script objects to store your data in an out of the way place. Persistant variable storage in Automator
storing the script seems to only work the first time.
When I paste the script refernced above into an Automator workflow and run the workflow several times, the returned value increments by one each time the script is run. Please post your code.
Upvotes: 1