I'm trying to write an AppleScript to delete a certain paragraph in a Pages document, which has the font color "red".
My working script is:
But when I change the section based on the size of the font to the color of the font, it doesn't work anymore.
My unworking script is:
My working script is:
Code:
tell application "Pages"
tell the front document
tell the body text
delete (every paragraph where its size is 11)
end tell
end tell
end tell
But when I change the section based on the size of the font to the color of the font, it doesn't work anymore.
My unworking script is:
Code:
tell application "Pages"
tell the front document
tell the body text
delete (every paragraph where its color is "red")
end tell
end tell
end tell