I have a 500 page document on iBooks Author. I would like to find a specific paragraph or text that is using a specific font, lets say “Georgia”.
I am trying to write a script that scans all paragraphs and checks its style. I know the script I am creating is not minimally correct by now but it is like this
tell application "iBooks Author"
activate
tell document 1
set indiceParag to count of paragraphs
repeat with indiceParag from 1 to indiceParag by 1
tell paragraph indiceParag
set nomeParag to the font
display dialog nomeParag
end tell
end repeat
end tell
end tell
The first line crashes with the message “iBooks Author got an error: Can’t get every paragraph of document 1”. Why not?