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
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.
Comments
You cannot run AppleScript code from a web page. (That would be an incredibly serious security issue.)
3 Comments
chinna_82
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?
Gregory
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.