I’m a little new at AS for OSX so please bear with me if my topic seems basic.
How do I get one AppleScript to run another AppleScript?
Also how do I make the first script wait for the second script to finish before the first one moves on to do more?
Thanks in advance.
Generally it depends on the format of the other script as to how you run it. If the other script is saved as a compiled script (as opposed to an AppleScript application) you can do something like:
set otherScript to load script "path:to:other.scpt"
Once loaded you can call it’s handlers:
set foo to otherScript's bar()
which will call the bar() handler in the other script and return its result in the variable ‘foo’.
As for the ‘wait’ question, that should happen automatically. AppleScript will wait for the otherScript’s handler to finish before continuing.