Friday, February 4, 2011

InDesign Scripting: Putting TextFrames in Perspective - for Visually Oriented Scripters

I admit it: I don't know the InDesign Scripting DOM by heart, so I spend a lot of time browsing around in the ExtendScript Toolkit Object Model Viewer.

I frequently work on very diverse projects - sometimes it's GWT/Java, sometimes it's ActionScript, sometimes it's PHP/WordPress, sometimes it's C++ or REALbasic, and so on... - and invariably, when I come back to a particular project, I need to spend some time refreshing basic knowledge.

It's like my brain 'switches' programming environment, and when I am deeply immersed in Java, I almost forget how to spell 'EkstentScript'.

The ExtendScript Toolkit Object Model Viewer (you find it under the 'Help' menu) is great for browsing the object model - but when it's been a while, it still feels like I am wading through molasses. One of the reasons for that is that I am a visually-oriented person. A picture is worth a few thousand mouse-clicks to me!

Lately, I've been revisiting BarredText - one of our latest scripted plug-ins, and to do that, I need to get back up to speed on TextFrames, Columns, Characters, Stories, and so on.
I decided I'd put in a little bit more effort, and put everything into a diagram - I've made a 2-page PDF file as a refresher I'll use next time I need to figure out how those buggers relate.

Because this might be useful to other people, I decided to release the PDF file under the 'Attribution-Share Alike' Creative Commons license:

I am not claiming this is error-free - if you find any errors, or can see ways to improve this, please let me know.

And if you like this - let me know too! Soon, I need to revisit tables and cells in ExtendScript - who knows, if I get enough positive feedback I might do another visual representation.

1 comment:

Kelly Vaughn said...

Hi Kris,
I was playing around with BarredText today, just seeing what it could do. I found that it doesn't work on path type. I don't know if it would be useful for anyone to have it work with path type, but I just thought I'd mention it. I love that plug in! And I love your visual guide, by the way. I'm not a scripter, but I think it is a great reference. Thanks for putting it together.
Kelly Vaughn