Thread View: adobe.scripting.indesign
5 messages
5 total messages
Started by Rasmus_Olsen
Tue, 24 Mar 2009 11:50
Get links parent page object
Author: Rasmus_Olsen
Date: Tue, 24 Mar 2009 11:50
Date: Tue, 24 Mar 2009 11:50
6 lines
932 bytes
932 bytes
Ladies and gentlement, Looping through the links in a document - how do I get a reference to these links parent page object? I'm writing a script where I need to alert the user on what page placed PDF files are linked to. Using parent.parent.parent (and so on) seems to get me nowhere as the links are all over the document hierarchy. Some magic using the constructor function? Regards, Rasmus
Re: Get links parent page object
Author: Peter Kahrel
Date: Tue, 24 Mar 2009 12:27
Date: Tue, 24 Mar 2009 12:27
14 lines
837 bytes
837 bytes
Some magic using the constructor function?
If parents are constructors, then yes -- but it's not magic (not in JS, anyway).
myLink.parent > Image
myLink.parent.parent > Rectangle
myLink.parent.parent.parent > Page
Peter
Re: Get links parent page object
Author: Rasmus_Olsen
Date: Tue, 24 Mar 2009 12:55
Date: Tue, 24 Mar 2009 12:55
13 lines
1201 bytes
1201 bytes
Ah, I see. But the placed files can be part of groups. This adds another segment to the parent hierarchy: myLink.parent > object pdf myLink.parent.parent > object rectangle myLink.parent.parent.parent > object group myLink.parent.parent.parent.parent> object page With constructor magic I was thinking of a loop of some kind that would go up through the parents as long as object was different from page object. But judging from your reply this isn't possible. Do you have a tip on what statement to use to distinguish between links part of a group and not? Regards, Rasmus
Re: Get links parent page object
Author: Dave_Saunders
Date: Tue, 24 Mar 2009 13:10
Date: Tue, 24 Mar 2009 13:10
5 lines
662 bytes
662 bytes
Check out this topic: <http://www.adobeforums.com/webx?128@@.59b77ee3> Dave
Re: Get links parent page object
Author: Rasmus_Olsen
Date: Tue, 24 Mar 2009 13:26
Date: Tue, 24 Mar 2009 13:26
4 lines
706 bytes
706 bytes
Eureka(!) Thanks Dave. Regards, Rasmus
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