• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Can't open JavaScript Dictionary in Script Editor

Explorer ,
Mar 21, 2016 Mar 21, 2016

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.

Screen Shot 2016-03-21 at 9.41.48 AM.png

Here is the blank window that sometimes opens:

Screen Shot 2016-03-21 at 10.33.36 AM.png

I can reproduce this on different machines. Does anyone else have this issue?

TOPICS
Scripting

Views

1.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2016 Mar 21, 2016

Copy link to clipboard

Copied

You are trying to open the InDesign application itself.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 21, 2016 Mar 21, 2016

Copy link to clipboard

Copied

Hi Peter, thanks for your reply. The window says "Select items to open their dictionaries"?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2016 Mar 21, 2016

Copy link to clipboard

Copied

I'll admit to being completely clueless about this. You'll probably get better help over in InDesign Scripting

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 21, 2016 Mar 21, 2016

Copy link to clipboard

Copied

Thank you! I'll try over there.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2016 Mar 21, 2016

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

InDesign ExtendScript API (10.0)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 22, 2016 Mar 22, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 22, 2016 Mar 22, 2016

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.:

Screen Shot 2016-03-22 at 10.57.12 AM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 22, 2016 Mar 22, 2016

Copy link to clipboard

Copied

I was trying to open the JavaScript dictionary

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Mar 22, 2016 Mar 22, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 22, 2016 Mar 22, 2016

Copy link to clipboard

Copied

Thanks, Trevor. It will open JavaScript dictionaries as well.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Mar 22, 2016 Mar 22, 2016

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"

Screen Shot 2016-03-22 at 17.38.47.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 22, 2016 Mar 22, 2016

Copy link to clipboard

Copied

It does seem like it's limited to InDesign. Photoshop and Illustrator include both dictionaries.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 22, 2016 Mar 22, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 22, 2016 Mar 22, 2016

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);

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 22, 2016 Mar 22, 2016

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Mar 22, 2016 Mar 22, 2016

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 22, 2016 Mar 22, 2016

Copy link to clipboard

Copied

Moved to scripting.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 23, 2016 Mar 23, 2016

Copy link to clipboard

Copied

LATEST

Thanks all!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines