I am struggling with selecting a range of characters. Maybe somebody can explain why I am not getting the range of text I am after, such as {text from character -7 to character -1 of text flow id 176 of document “Untitled-1”}. Then maybe I can move on to the selection part”which is another concern.
tell application "Adobe InDesign CS4"
tell document 1
set parentStoryID to story 1
set wordCount to "7" -- this number will come from a previous part in the script
set wordCount to "-" & wordCount as number
--stuck on the next few lines when trying to get an object reference of range of text items? Adobe InDesign CS4 got an error: Invalid value for set property 'selection'. Expected list of objects, object or nothing, but received (text, text, text, text, text, text, text).
set theTaggedText to object reference of (characters wordCount thru -1) of text frame 1
set selection to theTaggedText
gedText
end tell
end tell