[IDCS3] How to get link items' names?

I want to script a list of link items with parameters of Page No & link item name, but I tried several ways yet couldn’t figure it out:-

tell application "Adobe InDesign CS3"
	activate
	tell document 1
		repeat with p from 1 to (count of page)
			set theGraphics to all graphics of page p
			repeat with g from 1 to (count of theGraphics)
				-- How can I obtain the link items' names here?
			end repeat
		end repeat
	end tell
end tell

Please help! Thanks!

name of item link of (item g of theGraphics)

try this (nameList and PathList):

set nameList to {}
set pathList to {}
tell application "Adobe InDesign CS3"
	activate
	tell document 1
		repeat with p from 1 to (count of page)
			set theGraphics to all graphics of page p
			repeat with i in theGraphics
				set end of nameList to name of item link of i
				set end of pathList to file path of item link of i
			end repeat
		end repeat
	end tell
end tell
log nameList
log pathList

Greets from
TMA

Thank you to both of you! :slight_smile:

if you need to display the missing links in a separate text file, here is the code.

tell application “Adobe InDesign CS3”
tell document 1
set docName to name of it
set linkList to name of links whose status is link missing
end tell
end tell

set text item delimiters to return
set linksText to linkList as string
set text item delimiters to return

set theTitle to "Missing Links of document " & quote & docName & quote

tell application “TextEdit”
set newDocument to make new document
set text of newDocument to theTitle & return & “-------” & return & linksText
end tell

regards
gopala