Re: InDesign Override verb
Re: InDesign Override verb
- Subject: Re: InDesign Override verb
- From: David Wolfe <email@hidden>
- Date: Tue, 13 Mar 2007 13:21:39 -0400
Thank you to everyone who has helped out with this. I've got a script
that achieves what we needed, gathered together using all of your
thoughts. The script (below) overrides all items on all document
pages, detaches all items from their master spreads, creates a new
blank master spread, then deletes all other master spreads. This
allows us to icon-drag the pages to collect them into a new document
without any master page items being duplicated or reappearing if they
had been deleted. The side benefit is that the new collected document
doesn't have dozens of master spreads that are unneeded at this point.
The finished script:
tell application "Adobe InDesign CS2"
tell document 1
repeat with i from 1 to (count pages)
set MasterItems to (items whose class ≠ guide) of master page
items of page i
set overriddenItems to override MasterItems destination page page i
set detachedItems to detach overriddenItems
end repeat
make new master spread with properties {base name:"blanco"}
set obsoleteMasters to (every master spread whose base name ≠
"blanco")
delete obsoleteMasters
end tell
end tell
Thanks again for your help,
David Wolfe
On Mar 13, 2007, at 2:43 AM, Carlos Ysunza wrote:
Hi David,
I use this subroutine in one of my ID scripts
to Override_MasterItems()
tell application "Adobe InDesign CS2"
tell document 1
-- this is because we start at page 3 this routine, i = page number
repeat with i from 3 to (count pages)
--this filter some items that we don't want to override
set MasterItems to (items whose class ≠ guide and
label
≠"#numPagIzq" and label ≠ "#numPagDer" and label
≠"#textoPiePagConsultaHojaAnexa" and label ≠ "#textoPiePagIzq" and
label
≠"#textoPiePagDer" and label ≠ "#textoTituloClave" and label
≠"#textoTituloPrecioPublicoRegular" and label ≠
"#textoTituloPrecioPromo"and
label ≠ "#textoTituloLetra" and label ≠ "#graficoPlecaSeparadorIzq"
andlabel
≠ "#graficoPlecaSeparadorDer") of master page items of page i
override MasterItems destination page page i
end repeat
end tell
end tell
end Override_MasterItems
I think this code solve some of your issues.
Take care
--
Carlos Ysunza
Director
SoftRobot Automated Workflows
http://www.softrobot.com.mx
email@hidden
From: David Wolfe <email@hidden>
Date: Mon, 12 Mar 2007 14:23:25 -0400
To: Applescript Users <email@hidden>
Subject: InDesign Override verb
Hi,
I'm having some trouble getting my head around how the "override"
command works. I need to create a script that will override all
master page items, then detach all items from Master, then delete all
items from all Master pages. This is in preparation for a user
dragging pages from one document to another, to prevent unwanted item
duplication.
Could anyone point me in the right direction for these three tasks?
Thanks,
David Wolfe
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden