解決済み
Anchor position based on columns (scripting)
Hi, is it possible to know in which column you find something using scripting, I then want to anchor an object but it's location depends on the location of the text I find.
Thanks!
Hi, is it possible to know in which column you find something using scripting, I then want to anchor an object but it's location depends on the location of the text I find.
Thanks!
I just realized Story also considers textColumns so I put that instead of frame, I'm just thinking of a way to get the first insertion point of a frame from the story itself so the range isn't from 0 to the selection...
Quite right, I used just one text frame. Here's the correct version:
sel = app.selection[0];
frame = sel.parentTextFrames[0];
$.writeln (frame.parentStory.insertionPoints.itemByRange (
frame.insertionPoints[0].index,
sel.index)
.textColumns.length-1);
P.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.