Hello, hoping you can help.
I’m trying to automate a workflow and have created an applescript ‘application’ which creates calendar events in iCal.
From the customers CRM database it allows scripts which can call the applescript ‘application’ I have created. I’m struggling to pass variables from the script to the application it’s calling to run (hope that makes sense).
If the ‘application’ for creating the calendar appointments was in fact saved as a ‘script’. I have found I can pass variables between 2 scripts easily with an ‘on run’ and:
set appPath to (path to desktop as text) & "testhandlerApp.app"
run script file appPath with parameters {"Hi"}
So you might say just use a script then. I’ve found I have to create it as a standalone app because of OSX privacy permissions. If a ‘script’ is called from the database, it will give error permissions. If an ‘application’ is called from the database it will invoke apple’s ‘app’ is trying to access calendar and it can be allowed.
From what I’ve read I may have to do this with defining application ‘properties’. Or is there an alternative such as system global variables, or write them to text file and retrieve.
Thanks in advance.