-1

I am new to scripting in Adobe Software.

I would like to write a script, which shows me, where I can hyphenate a word. I wonder, if there is any way to get this information from the build in spellchecker. It should also take the current language into consideration.

This is what I came up with so far:

// Get the current selection
var mySelection = app.selection;

// Check, if it is a word
if (mySelection instanceof Word) {
    // Get the possible hypenation options
    var hyphenated = 

    // Add all hyphenation options to the text string
    mySelection[0].contents = hyphenated;
 }

I know it is not much, but I can’t find any way to access the spellchecker manually.

Afterlame
  • 1,188
  • 2
  • 13
  • 32

1 Answers1

0

No, you can't get hyphenation info via scripting.

I suppose the best you could do would be to create a text frame, insert the word, than make the frame increasingly narrow and see where InDesign hyphenates. But that is a pretty klydgy workaround!

Ariel
  • 119
  • 1
  • 10