Hello
(1) you missed to look at the Pages AppleScript’s dictionary which state that was was ‘number of characters’ in AppleWorks is ‘count of characters’ in Numbers.
(2) you are facing an error in the dictionary which states :
font (text) : The name of the font of the first character.
when it would be
font name (text) : The name of the font of the first character.
tell application "Pages" to tell document 1
set characterCount to count of characters
--> 944
properties of character 12
(*
--> {text indent:0.0,
collapsed:false,
underline color:missing value,
strikethrough color:missing value,
paragraph style:paragraph style "Format libre" of document id 1679709,
color:{9766, 9766, 9766},
number label tiered:false,
class:Unicode text,
prevent widows and orphans:true,
subscript:false, character style:missing value,
list style:list style "Aucun" of document id 1679709,
superscript:false,
label type:none,
space before:0.0,
remove hyphenation:false,
line spacing:1.0,
baseline shift:0.0,
shadow:false,
label indent:0.0,
contents:"s",
label baseline shift:0.0,
scale with text:true,
italic:false,
first line indent:0.0,
shadow offset:missing value,
shadow color:missing value,
following paragraph style:missing value,
font size:12.0,
capitalization type:normal capitalization,
space after:0.0,
label size:1.0,
left indent:0.0,
length:1,
character background color:missing value,
indent level:1,
label image data:missing value,
right indent:0.0,
shadow angle:missing value,
number label style:number paren zero,
paragraph background color:missing value,
text label string:missing value,
keep with next paragraph:false,
underline type:none,
bold:false,
alignment:left,
shadow opacity:missing value,
character offset:12,
shadow blur:missing value,
start new page:false,
line spacing type:relative,
ligatures:default ligatures,
outline:false,
hidden:false,
keep lines together:false,
font name:"ArialMT",
strikethrough type:none,
containing page:page 1 of document id 1679709,
tracking:0.0}
*)
set font name of character 12 to "Helvetica"
end tell
Yvan KOENIG (VALLAURIS, France) mercredi 14 décembre 2011 09:24:49