Thread View: adobe.scripting.indesign
2 messages
2 total messages
Started by christian_brugeron
Thu, 19 Mar 2009 03:57
select all text between pages
Author: christian_brugeron
Date: Thu, 19 Mar 2009 03:57
Date: Thu, 19 Mar 2009 03:57
10 lines
792 bytes
792 bytes
Hi, I'd like to select all text between 2 pages. So I can call eport to xhtml with that selection. I tried with textFrames and adding to a selection, but got the error "cannot across spreads". Any clue? Thanks
Re: select all text between pages (CS3, JS)
Author: christian_brugeron
Date: Fri, 20 Mar 2009 02:18
Date: Fri, 20 Mar 2009 02:18
13 lines
1060 bytes
1060 bytes
solution
var theDocument = app.activeDocument;
start = 44;
end = 55
for (i = start; i< end; i++) { var laPage = theDocument.pages.item(i); try { target = laPage.textFrames[0].texts; if (i == start) { app.select(target,SelectionOptions.REPLACE_WITH); // noter le replace } else {
app.select(target,SelectionOptions.ADD_TO);// le add to ne marche que s'il y a deja une selection ......
}
} catch(e) {$.writeln("page vide: "+i);};
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads