import VAR xml

and another question, why can’t i import added_items

if i point to a real path (ex1) it works fine, but i wan’t to import the added_items

property dialog_timeout : 30 -- set the amount of time before dialogs auto-answer.

on adding folder items to this_folder after receiving added_items
	
	tell application "Adobe InDesign CS3"
		activate
		open file "Users:bb:Desktop:cushman test:080351 COVER TEMPLATE.indt"
		delay 3
		tell active document
			import XML from "BEE-MP-02:Users:bb:Desktop:cushman test:TERADATA.xml"
		end tell
	end tell
	
end adding folder items to

property dialog_timeout : 30 -- set the amount of time before dialogs auto-answer.

on adding folder items to this_folder after receiving added_items
	
	tell application "Adobe InDesign CS3"
		activate
		open file "Users:bb:Desktop:cushman test:080351 COVER TEMPLATE.indt"
		delay 3
		tell active document
			import XML from added_items
		end tell
	end tell
	
end adding folder items to

thanks!!

Hi airebies,

I don’t have inDesign installed on my Mac, so this is just a guess.

In your first example you are using a text path:


import XML from "BEE-MP-02:Users:bb:Desktop:cushman test:TERADATA.xml"

But in your second exmaple you are using a list, added_items:


import XML from added_items

And I think that is the problem. You need to provide a text path, so try this instead:


repeat with added_item in added_items
import XML from (added_item as Unicode text)
end repeat

tadaaaaaa :wink: damned quick!!! tx mate…

works just fine!!