I am trying to convert a QuarkXPress script into an Indesign CS2 script, but I’m not having much luck.
I have a QuarkXPress 6.5 script that does the following:
– finds a specific character in a text box
– gets the first character of the paragraph containing this character
This is the sample text that I’ve been using for this script.
This is a sample list
1 Marketing
2 Shipping
3 +placeholder
4 Legal
Here’s the QuarkXPress script…
tell application "QuarkXPress"
tell front document
tell text box 1
set astPosition to index of (every character whose it is "+")
set paraPosition to (index of paragraph 1 whose it contains character astPosition)
set theChar to character 1 of paragraph paraPosition
end tell
end tell
end tell
And the Indesign version that isn’t working…
tell application "Adobe InDesign CS2"
tell front document
tell text frame 1
set astPosition to index of (every character whose it is "+")
set paraPosition to (index of paragraph 1 whose it contains character astPosition)
set theChar to character 1 of paragraph paraPosition
end tell
end tell
end tell
Any help would be greatly appreciated!
Thanks,
Jeff