How to run two AppleScripts simultantiously

applescript

I'm trying to figure out how to have two AppleScripts run simultaneously by clicking on the one icon. Currently I'm trying to use

set contentFile to myFolder & "Contents/Resources/Secondary.scpt"
do shell script "afplay " & quoted form of contentFile"

But I know the "afplay" is for audio not scripts. Any help would be great.

Best Answer

You can use path to resource to get the pathname of the .scpt file that's in an App's Resource folder, and then run the .scpt file using osascript e.g.:

set scptPath to POSIX path of (path to resource "Secondary.scpt")

do shell script "osascript" & space & scptPath