• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Deleting empty GRAPHIC rectangle in InDesign CS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deleting empty GRAPHIC rectangle in InDesign CS


  • Subject: Re: Deleting empty GRAPHIC rectangle in InDesign CS
  • From: Richard Rönnbäck <email@hidden>
  • Date: Wed, 12 Apr 2006 08:03:32 +0200
  • Thread-topic: Deleting empty GRAPHIC rectangle in InDesign CS

Title: Re: Deleting empty GRAPHIC rectangle in InDesign CS
I discovered exactly the same thing yesterday! Here is what I came up with


tell application "InDesign CS"
    tell active document
        set label of parent of parent of links to "Has link"
        try
            delete (items of (all page items) where class is rectangle and label is not "Has link")
        end try
        set label of parent of parent of links to ""
    end tell
end tell


// Richard


> Från: Shane Stanley <email@hidden>
> Datum: Wed, 12 Apr 2006 15:22:45 +1000
> Till: AS users <email@hidden>
> Konversation: Deleting empty GRAPHIC rectangle in InDesign CS
> Ämne: Re: Deleting empty GRAPHIC rectangle in InDesign CS
>
> On 12/4/06 9:47 AM, "Mara Jade Skywalker" <email@hidden>
> wrote:
>
>> I've tried almost every variation I can think of around the premise of:
>>
>> delete (every page item whose contents is "")
>>
>> But even if I run a script that compiles, nothing happens.
>>
>> Does anyone know how to isolate items that have a certain property?
>
> You can't directly; the only relevant property (all graphics) can't be used
> in a suitable whose clause, as you have found. However, you can use a whose
> clause based on a property of an element of a page item. So, for example:
>
>  page items where horizontal scale of graphic 1 of it ≠ 0
>
> will return a list of page items that contain graphics. Indeed, you don't
> even need a whose clause:
>
>  parent of all graphics of every page item
>
> But what you want is a list of the empty page items, so you'll need another
> step -- set a property of the non-empty page items, and delete all page
> items that don't match that property. For example:
>
>  set locked of parent of all graphics of page items to true
>  delete (every page item whose locked is false)
>
> --
> Shane Stanley <email@hidden>
> AppleScript Pro Sessions NJ May 06 <http://www.scriptingmatters.com/aspro>
>
>
>  _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> edband.net
>
> This email sent to email@hidden
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Re: Deleting empty GRAPHIC rectangle in InDesign CS (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Deleting empty GRAPHIC rectangle in InDesign CS
  • Next by Date: Re: Apple Remote Desktop 3 article
  • Previous by thread: Re: Deleting empty GRAPHIC rectangle in InDesign CS
  • Next by thread: get URL of podcast in iTunes?
  • Index(es):
    • Date
    • Thread