Woodwing's SmartConnection & InDesign's place command

Hi everybody,

I have a certain problem with scripting InDesign and am currently a bit lost about how to solve it. Maybe someone of you can help? Let me explain:

I wrote an application for a customer which downloads TV listings from a server directly into their InDesign documents as Tagged Text. You can see the app and the result in this screenshot. Normally everything works just fine, a nice workflow.

In general, an AppleScript identifies the corresponding text frame on a document page by its script label and then uses the place command to import the right Tagged Text file into it:


tell page pagenum
	tell text frame channelname
		set contents to ""
	end tell
	ignoring application responses
		place taggedtextfilepath on text frame channelname without autoflowing and showing options
	end ignoring
end tell

But when Woodwing’s SmartConnection plugin is active and the document features InCopy articles, then everything goes wrong. Instead of importing the Tagged Text file into the addressed text frame, the script creates a new text frame in almost the same location, as you can see here.

The weird thing is though, that the code above still works when it comes to emptying the contents of the addressed text frame (set contents to “”). So the AppleScript can address the text frame, but it cannot place a Tagged Text file onto it.

Does anybody know of any solution to this or how to make the AppleScript more compatible with the SmartConnection plugin? I have absolutely no experience with SmartConnection so far.

Thanks in advance for any feedback!

Best regards from rainy Berlin,

Martin

Hi. It may be helpful to know the version being used. I have no experience with that plugin, so my edit may be ineffectual, but try the below in place of your syntax. Your code initially set the frame’s content to empty, but that is superfluous, as the place command wipes legacy text. I’m also not sure what the ignoring bit was intended to avoid, but it could be problematic.

tell application "InDesign CS"'s document 1
place taggedtextfilepath on (page pagenum's text frame channelname) with properties {|autoflowing|:0, |showing options|:0}
end tell

Hi Marc,

First of all thank you very much for your answer, I really appreciate your help. Unfortunately I don’t know which plugin version they use, but they are working with Adobe InDesign CS4.

The “ignoring application responses”-part was added, because sometimes InDesigns displays an alert mentioning that some old styles are missing etc., which is then ignored and later dismissed using System Events. Unfortunately those alerts cannot be avoided by setting “user interaction level to never interact”.

Thanks and best regards from cloudy Berlin,

Martin