tell application "Pages"Note that the font name may not be what you expect. The script above searches for the font "Times", even though the name in the script is "Times-Roman". If you type just "Times", it will not work.
select (every character of body text of front document whose font name is "Times-Roman")
end tell
If you need help to see what font name AppleScript expects, mark the first word of Pages front document in the desired font, and run this script:
tell application "Pages"
display dialog (font name of word 1 of body text of front document as string)
end tell
(Sorry for the bad formatting above. Blogspot is not made to display source code. However, even if you cannot see the last characters on all rows, they should paste fine when you copy them.)
No comments:
Post a Comment