Skip navigation
Currently Being Moderated

JavaScript To Transpose Words

Aug 25, 2011 7:11 PM

[Also posted on the InCopy Scripting forum -- this will be an InCopy script -- but hoping for other insights from the InDesign side.]


I am trying to write a JavaScript to transpose adjacent words.


I plan to use the "move" function but am having trouble getting a reference to the word under the cursor.


I can find out which character I am in within the story...but don't think I should need to iterate through all of the characters in the story to determine the word number.


Can someone provide some guidance on how I can determine the number of the word under the cursor?


Thanks much!



More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points