In ApplescriptObjC/Xcode I am trying to pass a parameter/variable from one app to another, have managed to work out how to call another app but not how to pass. Also, how to accept a parameter in the receiving app. Any guidance gratefully received.
set appName to item i of menuList -- extract app name
current application's NSWorkspace's sharedWorkspace's launchApplication_(appName) -- launch selected app
tell application appName to activate -- activate selected app
tell current application's NSApp to terminate_(me) -- terminate this app