Thread View: adobe.scripting.indesign
8 messages
8 total messages
Started by Bradford_Armstrong
Tue, 16 Dec 2008 12:24
(AS) Direct Selection of a photo in a frame, can't find the term or command to do this, help?
Author: Bradford_Armstrong
Date: Tue, 16 Dec 2008 12:24
Date: Tue, 16 Dec 2008 12:24
1 lines
834 bytes
834 bytes
I have been working on a script that copies images from one frame to another. When I use the term select item 1 of page item "frame1" I am selecting the frame itself and not the image inside. Any help would be greatly appreciated.
Re: (AS) Direct Selection of a photo in a frame, can't find the term or command to do this, help?
Author: Roy_McCoy
Date: Tue, 16 Dec 2008 13:28
Date: Tue, 16 Dec 2008 13:28
12 lines
2721 bytes
2721 bytes
Bradford Armstrong wrote: > I have been working on a script that copies images from one frame to > another. When I use the term select item 1 of page item "frame1" I > am selecting the frame itself and not the image inside. Any help > would be greatly appreciated. I saw "graphic 1 of item 1" in a sample script. Does that do it? Roy McCoy Rotterdam, NL
Re: (AS) Direct Selection of a photo in a frame, can't find the term or command to do this, help?
Author: Kasyan Servetsky
Date: Tue, 16 Dec 2008 13:56
Date: Tue, 16 Dec 2008 13:56
10 lines
933 bytes
933 bytes
I suppose that the image is a linked file. tell application "Adobe InDesign CS3" tell active document set myRec to item 1 of page item "frame1" set myImage to the first image of myRec set myLink to item link of myImage show myLink end tell end tell
Re: (AS) Direct Selection of a photo in a frame, can't find the term or command to do this, help?
Author: Kasyan Servetsky
Date: Tue, 16 Dec 2008 13:59
Date: Tue, 16 Dec 2008 13:59
8 lines
806 bytes
806 bytes
I saw "graphic 1 of item 1" in a sample script. Does that do it?
No, graphic doesn't support select command.
Re: (AS) Direct Selection of a photo in a frame, can't find the term or command to do this, help?
Author: Roy_McCoy
Date: Tue, 16 Dec 2008 14:17
Date: Tue, 16 Dec 2008 14:17
11 lines
2493 bytes
2493 bytes
Kasyan Servetsky wrote: > No, graphic doesn't support select command. So what if it were a vector file rather than a bitmap? Thanks, Roy McCoy Rotterdam, NL
Re: (AS) Direct Selection of a photo in a frame, can't find the term or command to do this, help?
Author: Kasyan Servetsky
Date: Tue, 16 Dec 2008 14:29
Date: Tue, 16 Dec 2008 14:29
15 lines
1350 bytes
1350 bytes
But to copy/paste something via clipboard is an error prone process. Let's try another approach: tell application "Adobe InDesign CS3" tell active document set myFrame1 to item 1 of page item "frame1" set myFrame2 to item 1 of page item "frame2" set myImage1 to the first image of myFrame1 set myLink to item link of myImage1 set myPath to file path of myLink set theResult to place myPath on myFrame2 set myImage2 to the first image of myFrame2 set absolute horizontal scale of myImage2 to absolute horizontal scale of myImage1 set absolute vertical scale of myImage2 to absolute horizontal scale of myImage1 end tell end tell
Re: (AS) Direct Selection of a photo in a frame, can't find the term or command to do this, help?
Author: Kasyan Servetsky
Date: Tue, 16 Dec 2008 14:41
Date: Tue, 16 Dec 2008 14:41
24 lines
1454 bytes
1454 bytes
So what if it were a vector file rather than a bitmap?
I agree with you, Roy McCoy. It's better to use 'graphic' instead of 'image'. I didn't thought about vector files.
tell application "Adobe InDesign CS3"
tell active document
set myFrame1 to item 1 of page item "frame1"
set myFrame2 to item 1 of page item "frame2"
set myGraphics1 to the first graphic of myFrame1
set myLink to item link of myGraphics1
set myPath to file path of myLink
set theResult to place myPath on myFrame2
set myGraphics2 to the first graphic of myFrame2
set absolute horizontal scale of myGraphics2 to absolute horizontal scale of myGraphics1
set absolute vertical scale of myGraphics2 to absolute horizontal scale of myGraphics1
end tell
end tell
Re: (AS) Direct Selection of a photo in a frame, can't find the term or command to do this, help?
Author: Bradford_Armstrong
Date: Mon, 12 Jan 2009 20:57
Date: Mon, 12 Jan 2009 20:57
1 lines
753 bytes
753 bytes
show item link of the first graphic of item 1 of page item " " was the winner. Thanks.
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