1

I'm trying to call applescript from javascript. Is it possible to call applescript from javascript. Appreciated if anyone could provide some sample code or any references link.

2 Answers 2

2

In case you are running it in your own network (all computers are in your control), you can use this solution:

http://www.macosxautomation.com/applescript/linktrigger/index.html

Basically, the idea is to register some protocol with applescript launcher which will be used to launch your applescripts.

Again, it only works if all the user machines are under your direct control. It will not work for some random person coming to your page.

Sign up to request clarification or add additional context in comments.

Comments

2

You cannot run AppleScript code from a web page. (That would be an incredibly serious security issue.)

3 Comments

I have a scenario like this ux.stackexchange.com/questions/42911/…. Thought of create a applescript to do preview and trigger the applescript via javascript. Any idea how I could achieve that?
I'm not sure, but AppleScript is definitely NOT the solution.
there are other applications that use JavaScript. I use TapForms which has excellent JavaScript scripting support, and there are times when I want to use AppleScript to call other apps on my Mac from within TapForms' JavaScript scripts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.