• 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: Indesign CS4 question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Indesign CS4 question


  • Subject: RE: Indesign CS4 question
  • From: "Mark Workman" <email@hidden>
  • Date: Tue, 18 Aug 2009 14:53:51 -0400
  • Thread-topic: Indesign CS4 question

Thanks Ed, Stan and Shane for these replies. The following is working. I never considered setting the geometric bounds twice. Thanks again.

 

 

set the theBox to make rectangle with properties {geometric bounds:{.005 h2, .045, h3}, stroke weight:”0”}

place theImage on theBox

tell item 1 of theBox

      set topImage to graphic 1 of theBox

      set geometric bounds of topImage to {.005, h2, .045, h3}

      fit given center content

end tell

 

 

--------------------------

In CS2, you can adjust the geometric bounds of the image, just as you do the rectangle.

 

Like this:

 

tell application "Adobe InDesign CS2"

   tell document 1

     tell page item 1

       tell image 1

         set geometric bounds to {2.0, 5.5, 15.0, 20}

       end tell

     end tell

   end tell

end tell

 

 

HTH,

 

ES

----------------------

Hi Mark,

 

In fact, what Ed suggests is the only way to control the absolute position an image.

 

There¹s a big difference between scripting images in InDesign and using the GUI. In the GUI, an image's geometric bounds are relative to it's containing rectangle, so when you move a rectangle, the image goes along for the ride.

 

But when scripting, both the rectangle's and the image's bounds are relative to the page, not each other. So if you reposition the rectangle, you must separately reposition the image.

 

InDesign's 'fit' AS command does provide a way to position an image relative to its containing rectangle, but only if one of the command options does what you need (center, proportional fit, etc.). If not, you'll need to calculate new geometric bounds for both rectangle and image and reposition them individually.

 

Stan C.

----------------------

You can also use the move command to move just the image, as the OP wants:

 

tell application "Adobe InDesign CS4"

    tell document 1

        move image 1 of rectangle 1 by {100, 0}

    end tell

end tell

 

> So if you reposition the rectangle, you must separately reposition the image.

 

It would probably be better to say that if you change the bounds of one, it is independent of the other. But if you reposition a rectangle using the move command, like this:

 

tell application "Adobe InDesign CS4"

    tell document 1

        move rectangle 1 by {100, 0}

    end tell

end tell

 

the image goes along for the ride.

 

--

Shane Stanley <email@hidden> AppleScript Pro Sessions <http://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:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Indesign CS4 question (From: "Mark Workman" <email@hidden>)

  • Prev by Date: Re: Unable to send user input string to Webster Dictionary Application using variable
  • Next by Date: Re: Unable to send user input string to Webster Dictionary Application using variable
  • Previous by thread: Re: Indesign CS4 question
  • Next by thread: Open command in Photoshop CS3
  • Index(es):
    • Date
    • Thread