1

I know app.paste(); method dumps the contents of the clipboard at the spot where the cursor is currently. However, I want to define the location via a variable such as this:

myStory = app.activeDocument.stories[1];

And I want to dump the contents of the clipboard in that story as defined by the variable myStory. Is it possible? How?

2
  • Why does this question deserve a downvote?
    – TheLearner
    Feb 15, 2015 at 13:48
  • Didnt dowvote, but i could hazard that your question may come as a bit unresearched. The question in my mind its ok tough it may be more of stuff for stackoverflow instead.
    – joojaa
    Feb 15, 2015 at 17:25

1 Answer 1

2

I think you cant insert it into the story, but you can use insertionPoints like this:

var doc = app.activeDocument;
var ip = doc.stories[1].insertionPoints[0];
app.select(ip, SelectionOptions.REPLACE_WITH);
app.paste();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.