Copy link to clipboard
Copied
Hi scripters
i want to cut, copy and paste text from cursor position to end of story in to new text frame?
how can i do this?
thanks in advance
regards
a r u l
Hi Arul,
Here is example for you. You can change the position and size of text box as per your requirement.
if (app.selection[0].constructor.name != "InsertionPoint")
{
exit();
}
var mypage = app.selection[0].parentTextFrames[0].parent;
app.select(app.selection[0].parentStory.insertionPoints.itemByRange (app.selection[0].index, app.selection[0].parentStory.characters[-1].index))
app.cut();
var tf = mypage.textFrames.add ({geometricBounds: [0,0,100,100]})
app.select(tf.insertionPoints[0])
app.paste();
Shonk
...Copy link to clipboard
Copied
Hi Arul,
Here is example for you. You can change the position and size of text box as per your requirement.
if (app.selection[0].constructor.name != "InsertionPoint")
{
exit();
}
var mypage = app.selection[0].parentTextFrames[0].parent;
app.select(app.selection[0].parentStory.insertionPoints.itemByRange (app.selection[0].index, app.selection[0].parentStory.characters[-1].index))
app.cut();
var tf = mypage.textFrames.add ({geometricBounds: [0,0,100,100]})
app.select(tf.insertionPoints[0])
app.paste();
Shonky
Copy link to clipboard
Copied
Thank you Shonky Great work
Find more inspiration, events, and resources on the new Adobe Community
Explore Now