Launch an application from Javascript.

I'm trying to write a simple javascript so that I can launch an application (applescript app) from a PDF. I have found in Adobe Acrobat, that a link that runs Javascript can be a soloution.


Using the script Editor I have this.

var keycheck = Application('/Volumes/CloudStorage/Dropbox/Scripts/Dock Scripts/KeywordChecker.app');

keycheck.activate();

It runs and the keyword app quits, as it should behave. but when running the javascript after it has all ran ok I get the error

Error on line 2: Error: Connection is invalid.

What is happening here and how an I stop this?

Thanks

Matt

Mac Pro, macOS High Sierra (10.13)

Posted on Mar 15, 2018 9:10 AM

Reply

Similar questions

3 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Launch an application from Javascript.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.