I have found a few things on how to run another applescript application but not on giving it an input. On applescript site I found this:
tell application "NonStayOpen"
launch
stringTest("Some example text.")
end tell
Which would be a solution, I just rap the script in a handler and pass my variable. But not matter what I do I can not get the handler to activate.
Ideal Situation run script that contains the following:
tell application id "com.apple.testhandlerApp"
TestHandler("Hi") --Or if I can get the Open(SomeVar) to work
end tell
which then activates application testhandlerApp containing the script:
on TestHandler(somevar)
set contentText to somevar as string
display dialog contentText
end TestHandler
Giving me a dialog saying "Hi". Reason being is I want to put the first bit of code into automator to runs a complex application that takes a text input. Right now all I get is "Connection is invalid." If I didn't need the input it seems using activate works fine.