Indesign graphic links

Hi,

Im trying to get the link address to every picture box on each page of an Indesign file. The following AppleScript works fine if there is more than one graphic box. However, if there is only one it returns a record of the link as individual characters… can anyone help me

tell application “Adobe InDesign CC 2019”
tell document 1
set pagecount to count pages
repeat with theLinkRef from 1 to pagecount

		set GraphicLinkName to file path of item link of all graphics of page theLinkRef
		
		display dialog "Page " & theLinkRef & " Link count = " & (count of GraphicLinkName)
		
		repeat with x from 1 to (count of GraphicLinkName)
			display dialog item x of GraphicLinkName
		end repeat
	end repeat	
end tell

end tell

I see, you should use as list coercion:


set GraphicLinkName to (file path of item link of all graphics of page theLinkRef) as list

That works, Perfectly…

Many thanks KniazidisR