Your tracking number for this issue is Bug ID# 7771142.
Hello
There is a bug in the Applescript support of Pages.
If a WP document embed a text box, the code:
tell application "Pages"
tell document 1
tell page 1
tell text box 1
single color
end tell
end tell
end tell
end tell
fails with the error:
tell application "Pages"
get single color of text box 1 of page 1 of document 1
"Erreur dans Pages : Impossible de transformer single color of text box 1 of page 1 of document 1 en type reference."
We may get it working if we code:
tell application "Pages"
tell document 1
tell page 1
tell text box 1
«property pSFC»
end tell
end tell
end tell
end tell
But, it's boring because the raw instruction is automatically replaced by single color and, if we must edit something, we are forced to rewrite the raw instruction.
So, at this time I use an other workaround:
tell application "Pages" to tell front document
repeat with g in every graphic
tell g to if get class is text box then if single color is {65535, 65535, 13107} then set single color to missing value
end repeat
end tell
which behaves flawlessly.
It would be fine to kill this bug.
Yvan KOENIG (VALLAURIS, France) vendredi 19 mars 2010 11:21:55