tell application "Adobe InDesign CS3"
tell text style range 1 of text frame 1 of spread 1 of document 1
--get properties
get size
end tell
end tell
This fails even though I see a “Size: 13.0” in the property list?
On a related note, I’m also trying to coerce "font “Times New Roman MT Std Bold” of application “Adobe InDesign CS3"” to get just “Times New Roman MT Std” into a string.
The style comes out nicely, though.
Perhaps I’m not seeing something that’s obvious? thanx, sam
set ASTD to AppleScript's text item delimiters
tell application "Adobe InDesign CS2"
tell text style range 1 of text frame 1 of spread 1 of document 1
set TheSize to point size
set TheFont to name of applied font
set AppleScript's text item delimiters to tab
set TheFontName to text item 1 of TheFont
set TheFontStyle to text item 2 of TheFont
set AppleScript's text item delimiters to ASTD
end tell
end tell
return {TheFontName, TheFontStyle, TheSize}
I’m using text item delimiters to parse out the font name and style of the font from the returned value, the two are separated by a tab in the string ID gives to AppleScript.