> can't wait to see how Roy finishes his tomorrow!
It was to laugh. But I finally got a basic working version today:
tell application "Adobe InDesign CS4" activate --Set/choose the doc to copy from and the doc to copy to. set myDocA to choose file with prompt ¬ "Choose file to copy pages from:" set myDocB to choose file with prompt ¬ "Choose file to copy pages to:" (* --While working this out I'm using: set myDocA to " Great Royzito:Users:Home:Dropbox:Public:10A.indd" set myDocB to " Great Royzito:Users:Home:Dropbox:Public:10B.indd" --but there's likely no point in "hard-wiring" it otherwise. *) --Open/switch to the doc to be copied from. open myDocA --Get page count. set myDocAPageCount to pages per document ¬ of document preferences of active document --Open/switch to the doc to be copied to. open myDocB --Get its page count. set myDocBPageCount to pages per document ¬ of document preferences of active document --If not same number of pages, alert and stop. if myDocAPageCount is not equal to myDocBPageCount then display dialog "Sorry, not same number of pages." return end if --Loop through determined page count. repeat with i from 1 to myDocAPageCount --Switch to first doc (it's already open). open myDocA --Go to first or next page and select all. tell document 1 set active page of layout window 1 to page i select all end tell --Copy. copy --Do same with second doc, only paste rather than copy. open myDocB tell document 1 set active page of layout window 1 to page i end tell paste in place end repeat end tell
Yes, I know this is *not* the way to do it. I wound up not consulting my old PageMaker script, since I remembered well enough what I had done, and spared myself the agony of trying to get back into the old syntax. The first thing I want to do now is get this properly fixed up in line with the object model, and then maybe we can move on to Michael B.'s nine 2-page spreads. If others find some of the AppleScript demands curious - with various things having to be done by the application, document, layout window, etc. - so do I. But it seems like pretty much everything is nonetheless possible, and it works when you've figured out how.
Merry Christmas to me (greetings to you too),
Roy
-- This list is a free service of LassoSoft: http://www.LassoSoft.com/ Search the list archives: http://www.ListSearch.com/InDesign/Browse/ Manage your subscription: http://www.ListSearch.com/InDesign/
Dec 25
Dirk Becker Re: AS: Re: Go to the end of the book
Dec 25, 2009; 06:51
Dirk Becker
Re: AS: Re: Go to the end of the book
Dec 25
Roy McCoy Re: AS: Re: Go to the end of the book
Dec 25, 2009; 07:18
Roy McCoy
Re: AS: Re: Go to the end of the book
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!