Article View: adobe.scripting.indesign
Article #8909Re: Are there policies for usage of labels?
From: Dirk_Becker
Date: Wed, 20 Sep 2006 08:50
Date: Wed, 20 Sep 2006 08:50
41 lines
1771 bytes
1771 bytes
Hi Gerald,
interesting script. May I borrow the idea for a plugin?
Below a copy that takes advantage of a few more AppleScript features ...
Dirk
tell application "Adobe InDesign CS2"
set aDoc to active document
set aSel to selection
repeat with aThing in aSel
set aLayer to (id of item layer of aThing) as text
insert label aThing value aLayer key "gslg"
end repeat
if length of aSel > 1 then
tell aDoc
make group with properties {group items:aSel}
select the result
end tell
end if
end tell
tell application "Adobe InDesign CS2"
set aDoc to active document
set aSel to selection
repeat with aThing in aSel
if class of aThing is group then
set aPageItems to every page item in aThing
ungroup aThing
repeat with aPageItem in aPageItems
set aLayerID to (extract label aPageItem key "gslg") as integer
if exists layer id aLayerID of aDoc then
set item layer of aPageItem to layer id aLayerID of aDoc
end if
end repeat
select aPageItems
end if
end repeat
end tell
Technical Details
Message-ID:
<3bc1a682.3@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!news.germany.com!news.isoc.lu!webcrossingReferences:
<3bc1a682.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,bb0ad9c2d1a7e9a8 X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII-7-bit From: Dirk_Becker@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.freenet.de!news.germany.com!news.isoc.lu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: Are there policies for usage of labels? Message-ID: <3bc1a682.3@webcrossing.la2eafNXanI> Date: Wed, 20 Sep 2006 01:50:07 -0700 References: <3bc1a682.-1@webcrossing.la2eafNXanI> Lines: 42 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit