script which creates layout (indesign) from text-file/xml?


i’m a totally newbie to this applescript stuff and the possibilities are great! programming/scripting in common isn’t a totally new world to me but i hope i can find some help out here…

i’m actually looking for a script which creates a simple 1-page-layout in indesign based on a textfile or xml file. background: I have a bunch of different textfiles each containing text information & image link/filename, and I need this text to be placed, formatted, and the image placed… and saved as an indesign file.

does anyone have a clue how to do that? :rolleyes:

your help would be really appreciated! kuni :smiley:

I have no experience with InDesign, but if it doesn’t know how to read/interpret XML files, you might want to check out XML Tools, from Late Night Software. XML Tools is a scripting addition that allows AppleScript to parse and generate XML data. You might also want to take a look at XParserLib, from the Little Page of Libraries. It is described as “Basic XML/XHTML parser; bit hokey, but should do for less ambitious tasks”.

This will likely be a difficult task for a beginner so I hope you find someone with experience to help. :slight_smile:

uh… sounds already rather scary to me :wink: thank you for your hint!

indesign can actually interpret xml files, but it can just “fill up” an existing/predefined layout, not create an entirely new one… the text/xml-file in my case also contains besides text and image information also layout information, like position or size…

but i think this should be somehow possible since indesign support almost every function w/ applescript… adobe has released a several hundred page length document about scripting indesign…

yes, InDesign will import xml, but you are right, you need a tagged document, otherwise it will just dump the info into the document structure and you will have to manually drag the info onto the page.
If you can use a template, you can create a template with tagging. If you knew what you were doing, you could script the template creation, template tagging and xml import. It’s all in the InDesign scripting dictionary.
I’m new to InDesign so the most help I can give you is to suggest that you get Shirley Hopkins’s “Applescripting InDesign”. If it’s half as good as her “Scripting QuarkXPress” it would be one of the best guides to getting started. And probably much easier reading than the Adobe scripting manual. :slight_smile:

hi Dennis!

thanks for your information :smiley: just ordered the book! I’ve seen it a few days ago already at but haven’t ordered it since it has to ship all the way from the us to germany - but now - we’ll see when it gets here, hopefully I’ll find some useful information in it 8)