After years of scripting old Quark, I am making my first, faltering steps in InDesign. Starting with something simple, I am trying to get an applescript to detect a selected frame anywhere in a document. Following the examples, I have already conversed with a frame when I know which page it is on. What I am interested in is being able to get a script to work with no hard-wired references to ''Page 1'' etc. Hope I haven't overlooked something in the examples!
Getting script to detect selected frame...document.selection[0] is what you are looking for i think. (JS - how it translates to AS i dont know, but in the OMV, under document, there should be a selection)
Getting script to detect selected frame...Thanks, Thomas, your JS hint was enough to get me where I wanted.
The rough equivalent of ''current box'' is ''item 1 of selection'', although often you can just address ''selection'' as if it's a reference to a single item, even though it always returns a list.
--
Shane Stanley %26lt;sstanley@myriad-com.com.au%26gt;
AppleScript Pro Sessions %26lt;http://scriptingmatters.com/aspro%26gt;
No comments:
Post a Comment