Hello,
I am trying to search every hard return and replace them by soft ones - but: only if the character font is e.g. “Helvetica” and size e.g. 12. I don’t get the right references, the second clause doesn’t work. Has anyone a hint? Would it be better to reference “text range”, story, text …?
Thanks for reading.
Cheers,
Erden
So far:
set searchStr to (ASCII character of 13)
set replaceStr to (ASCII character of 7)
-...
tell docRef
set TheStories to count of every story
repeat with i from 1 to TheStories
try
set mysearch to (a reference to (text of story i whose contents of it = (searchStr)))
-- and (text of story i whose font of it = (myFont))))
--set searchReferences to ((object reference of every text style range of every story) whose font is theFont)
end try
set contents of mysearch to (replaceStr)
end repeat
end tell
--...