Copy link to clipboard
Copied
When I try to open the JavaScript Dictionary for InDesign, my Script Editor either (1) hangs and then closes the "open" window without doing anything, or (2) opens a blank dictionary window.
Below is a screenshot of what I mean by opening the JavaScript dictionary.
Here is the blank window that sometimes opens:
I can reproduce this on different machines. Does anyone else have this issue?
Copy link to clipboard
Copied
You are trying to open the InDesign application itself.
Copy link to clipboard
Copied
Hi Peter, thanks for your reply. The window says "Select items to open their dictionaries"?
Copy link to clipboard
Copied
I'll admit to being completely clueless about this. You'll probably get better help over in InDesign Scripting
Copy link to clipboard
Copied
Thank you! I'll try over there.
Copy link to clipboard
Copied
Script Editor is an AppleScript editor, you can't write and save Javascript in Script Editor. If you want to write AppleScript the AS dictionary should open via File>Open Dictionary.... Do any dictionaries open? Can you open OSX app dictionaries like Contacts or Finder?
If you want to write JavaScript you have to use a text editor or ExtendScript Editor. There is an excellent API reference on line for JS here
Copy link to clipboard
Copied
Hi rob,
Actually, Script Editor is for AppleScript, JavaScript, and C.
But it looks like InDesign supports it's own kind of Javascript, not OS X's JavaScript for Automation.
Thanks
Copy link to clipboard
Copied
Right, but the dictionary you are trying to open is for AppleScript. If you change your Script Editor language preference to AppleScript it should open, but you can see the syntax is AS. Adobe's ExtendScript toolkit has built in features for writing JS for Adobe apps–I've found it to be kind of slow, but I don't write much JS.:
Copy link to clipboard
Copied
I was trying to open the JavaScript dictionary
Copy link to clipboard
Copied
Although one can use the script editor for non-applescript, AFAIK it will only open applescript dictionaries.
The ESTK will open the js dictionaries but the link that Rob Day provided is more useful.
Sublime text or Bracket are more suitable that the applescript editor or ESTK
Copy link to clipboard
Copied
Thanks, Trevor. It will open JavaScript dictionaries as well.
Copy link to clipboard
Copied
Not InDesign ones.
It says it's JavaScript but it's fibbing! it's applescript.
The js dictionaries are omv files which I don't think the editor can read. The formatting is completely different.
As Peter wrote the scripting forum is the place for this tread but I'd be mightily surprised if your get any different feedback.
Remember also that "InDesign" unlike CEP does not understand JS so to speak rather it's own incarnation of JS, "Extended Script"
Copy link to clipboard
Copied
It does seem like it's limited to InDesign. Photoshop and Illustrator include both dictionaries.
Copy link to clipboard
Copied
Hm, I think Jack is referring to Apple's "JavaScript for Automation" in OSX 10.10 and 10.11. perhaps.
That has nothing to do with Adobe's ExtendScript for InDesign, Illustrator, PhotoShop etc.pp.
Introduction to JavaScript for Automation Release Notes
Uwe
Copy link to clipboard
Copied
It may be that you could get JS to work out of ScriptEditor, but it doesn't seem to respond correctly to the ID API, or AI or PS for that matter—I haven't tried very hard.
So from ExtendScript this works as expected and displays a dialog with the active document's name:
var n=app.activeDocument.name;
prompt("Hello "+n);
From Script Editor this compiles but doesn't seem to get the document's name
var app= Application("Adobe InDesign CC 2014")
app.includeStandardAdditions = true
var n=app.activeDocument.name;
app.displayAlert("Hello "+n);
Copy link to clipboard
Copied
Hi Rob,
I did not see a comment by Adobe, if all or even some of the CC apps are JXA "aware" or JXA "ready".
Uwe
Copy link to clipboard
Copied
Yep, new stuff to me
Can someone with magic powers Laubender Peter Spier magic this thread off to the scripting department, I think it would be of interest to the people over there.
Copy link to clipboard
Copied
Moved to scripting.
Copy link to clipboard
Copied
Thanks all!