Call or Run AppleScript from within a JavaScript

Maybe I am too tired, but I just can’t seem to find any reference to this.

I know this isn’t a javascript forum, but I trust all of you on this site more than others.

Is there a way to call an applescript from within a javascript?

The reverse is very easy. I prefer using AppleScript, but in this case I have a rather robust dialog box whose values returned I hope could call an AppleScript.

Any help would be very much appreciated.

-Jeff

I am no Javascript expert, so I guess this short article will make more sense to you :slight_smile:

http://www.bitwalker.nl/blog/applescript-with-groovy

Just stumbled across this some days ago while browsing through the latest AppleScript blog news.

EDIT: I am sorry, the mentioned article is about JAVA, not Javascript. But here is another interesting link:

http://www.dashboardwidgets.com/forums/viewtopic.php?t=260

This may be of interest to you:

Webpage Helper

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

And this, though (I’m told) it no longer works in Leopard (and will likely not be updated anytime soon) may have some useful examples for you. (Look in the ‘Extras’ folder of the download.)

Missing Link

http://scriptbuilders.net/files/missinglink2.3b3.html

Good Luck.

Peter B.


Thank you, both of you for getting back to me on this. All of this information is very helpful, whether or not it is applicable to my specific scenario or not. And I especially like the features and capabilities of the missing link script. I need to look into this in detail. Many thanks once again.
-Jeff

I must admit Dave, being that I am new to javascript, following your code isn’t extremely intuitive to me. (rather the opposite)
i.e.,
#target indesign
#targetengine “PDSnudger”

obviously this means a lot, but what I found on the web and on other posts didn’t lead me into where I hoped.

Is there a good resource somewhere that explains the fundamentals of how to create a floating palette? Honestly, I don’t know any other InDesign javascript forums besides here. I presently do not have the official CS3 javascript guide. I would be willing to buy it if it describes how I could set something up like what you have.

It would be nice if there was a “Hello World” floating dialog palette tutorial (that also contained some pulldowns and radio buttons on the palette.) Maybe there is?

Once I learn I how to make these things, I think I’ll need more monitors!

Thanks once again for all of your help,
Jeff