I have some very long documents that is written with several font sizes intermingled throughout the text. For example some text in 14 pt and some text in 12 pt. How can I change one of the sizes without changing the other? For example suppose I want to change the 12 pt text to 14 pt and the 14 pt text to 16 pt? I have written the following AppleScript but I cannot get it to work. Whatever I do seems to error and when I change it to avoid that error I get another until it goes in circles:
```
tell application "Pages"
activate
set theDoc to the front document
tell theDoc
set bodyText to body text
repeat with i from 1 to count of paragraphs of bodyText
set thePara to paragraph i of bodyText
tell thePara
set paraText to its text
if paraText ≠ "" then -- Ensure paragraph has content
if size of its style is 12 then
set size of its style to 14
else if size of its style is 14 then
set size of its style to 16
end if
end if
end tell
end repeat
end tell
end tell
```
Any suggestions on how to accomplish what I am trying to do will be appreciated... Thanx!
```
tell application "Pages"
activate
set theDoc to the front document
tell theDoc
set bodyText to body text
repeat with i from 1 to count of paragraphs of bodyText
set thePara to paragraph i of bodyText
tell thePara
set paraText to its text
if paraText ≠ "" then -- Ensure paragraph has content
if size of its style is 12 then
set size of its style to 14
else if size of its style is 14 then
set size of its style to 16
end if
end if
end tell
end repeat
end tell
end tell
```
Any suggestions on how to accomplish what I am trying to do will be appreciated... Thanx!