I am trying to run through a document that has some XML tagged text. I am then trying to find any “space” characters that are the 1st character of said paragraphs. In my script, the test to find character “x” works. But it is not working on trying to select and test for a space character.
What am I doing wrong? Do I have to search for a space using its ASCII id equivalent?
Any help would be greatly appreciated.
Thanks in advance,
-Jeff
tell application "Adobe InDesign CS4"
activate
set thecharList to {"x", " "}
tell active document
repeat with i from 1 to count of stories
repeat with iPar from 1 to count of paragraphs in story i
set theLabel to associated XML elements of word 1 of story i
if theLabel is equal to {} then
exit repeat
end if
if character 1 of word 1 of paragraph iPar of story i is in thecharList then
set selection to character 1 of word 1 of paragraph iPar of story i
display dialog "I do"
end if
end repeat
end repeat
end tell
end tell