Thread View: adobe.scripting.indesign
8 messages
8 total messages
Started by Achy_Fakey
Fri, 23 Jan 2009 16:48
How Do I Rotate Content, Not the Frame
Author: Achy_Fakey
Date: Fri, 23 Jan 2009 16:48
Date: Fri, 23 Jan 2009 16:48
11 lines
1363 bytes
1363 bytes
I am in InDesign CS1. I need to figure out how to affect the content of a placed image, not the surrounding frame. I know how to set the rotation angle of the selected object's frame: set rotation angle of selection to 10 But for the life of me, I cannot understand how to leave the frame as it is and just rotate the content. I.E., normally, if I grab the direct selection tool and click an image (hovering over the image inside the frame turns to the hand tool), I can then manipulate the content without affecting the outside frame. But I want to do this with an AppleScript. I also assume that if someone can open this door for me, it will then lead the way to being able to scale the content, without affecting the frame. But I cannot figure out the secret of "content" vs. "selection". Halp! Thank you!
Re: How Do I Rotate Content, Not the Frame
Author: Kasyan_Servetsky
Date: Fri, 23 Jan 2009 17:02
Date: Fri, 23 Jan 2009 17:02
12 lines
860 bytes
860 bytes
Hi Achy, I'm on CS3, but hope it will work on CS1. tell application "Adobe InDesign CS3" set myDoc to active document set myFrame to rectangle 1 of myDoc set myImage to image 1 of myFrame set absolute rotation angle of myImage to 10 end tell Kasyan
Re: How Do I Rotate Content, Not the Frame
Author: Kasyan_Servetsky
Date: Fri, 23 Jan 2009 17:05
Date: Fri, 23 Jan 2009 17:05
2 lines
687 bytes
687 bytes
P.S. So, your line should be: set rotation angle of image 1 of selection to 10
Re: How Do I Rotate Content, Not the Frame
Author: Achy_Fakey
Date: Fri, 23 Jan 2009 17:19
Date: Fri, 23 Jan 2009 17:19
5 lines
986 bytes
986 bytes
I am trying your suggestion, but I the script hangs at the term "image 1" (or even just "image"). Not sure where to go from there. What really confuses me is that I thought that "set rotation angle" should adjust the frame while "set absolute rotation angle" would adjust only the content, not the frame. But they both give me the same result of rotating the frame. Argybargy!
Re: How Do I Rotate Content, Not the Frame
Author: Kasyan_Servetsky
Date: Fri, 23 Jan 2009 17:40
Date: Fri, 23 Jan 2009 17:40
8 lines
1066 bytes
1066 bytes
I don't have neither ID CS1 nor its reference, so I can't check if the syntax is correct. There is a difference between absolute rotation angle and rotation angle: absolute rotation angle � The rotation angle applied to the object, not including any rotation applied to its containing object. rotation angle � The rotation angle applied to the object, including any rotation applied to its containing object. I prefer to use absolute rotation angle.
Re: How Do I Rotate Content, Not the Frame
Author: Achy_Fakey
Date: Fri, 23 Jan 2009 18:36
Date: Fri, 23 Jan 2009 18:36
25 lines
1744 bytes
1744 bytes
Your definitions are what I would expect, but for me, applying each version as one of these two separate scripts: 1) tell application "InDesign CS" activate set rotation angle of selection to 10 end tell 2) tell application "InDesign CS" activate set rotation angle of selection to 10 end tell Gives me the same result. The frame rotates and the content rotates with it. Let me start over with my problem as that may help... So let's say I have a frame and it has rotation 0˚. Inside the frame I have an object rotated to 5˚. Applying either of those two scripts has the same result. The frame rotates to 10˚ and the content (when selected with the direct selection tool) now shows a rotation of 15˚. But what I want is for the frame to stay at 0˚ and the content (when selected with the direct selection tool) to show a rotation of 15˚. I am thinking this may be relates to the "Transform Content" and "Transformations Are Totals" preference settings. Both of which I have turned on. I know how to turn them on and off with an AppleScript, but it doesn't seem to be helping.
Re: How Do I Rotate Content, Not the Frame
Author: Kasyan_Servetsky
Date: Fri, 23 Jan 2009 18:54
Date: Fri, 23 Jan 2009 18:54
1 lines
654 bytes
654 bytes
You get the same results because you're rotating container, not contents. You should rotate the image inside the rectangle, not the rectangle.
Re: How Do I Rotate Content, Not the Frame
Author: Shane_Stanley
Date: Fri, 23 Jan 2009 21:58
Date: Fri, 23 Jan 2009 21:58
11 lines
1615 bytes
1615 bytes
On 24/1/09 4:19 AM, "Achy Fakey" <member@adobeforums.com> wrote: > I am trying your suggestion, but I the script hangs at the term "image 1" (or > even just "image"). Use "graphic" instead of image -- image means bitmap picture, whereas graphic refers to any sort. -- Shane Stanley <sstanley@myriad-com.com.au> AppleScript Pro Florida, April 2009 <http://scriptingmatters.com/aspro>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads