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