Guest
2011-09-09, 02:23 PM
Incidentally, you can get a list of the available attributes (placing it in the clipboard) with something like this:
Code:
tell application id "OOut"
tell front document
set {dlm, my text item delimiters} to {my text item delimiters, return}
set the clipboard to (name of (attributes of its style)) as Unicode text
set my text item delimiters to dlm
end tell
end tell
or, to get some idea of the type of values which these attributes have:
Code:
tell application id "OOut"
tell front document
set {lstName, lstValue} to {name, value} of (attributes of its style)
set {dlm, my text item delimiters} to {my text item delimiters, ","}
set str to ""
repeat with i from 1 to count of lstName
set varValue to missing value
try
set varValue to item i of lstValue
end try
if class of varValue is list then
set strValue to ("{" & varValue as Unicode text) & "}"
else if class of varValue is text then
set strValue to ("\"" & varValue as Unicode text) & "\""
else
set strValue to varValue as Unicode text
end if
set str to str & item i of lstName & " = " & strValue & return
end repeat
set my text item delimiters to dlm
set the clipboard to str
end tell
end tell
(Looks as if there could be a bug in the reading of the
shadow-offset attribute, however)
--
Last edited by RobTrew; 2011-09-09 at 02:43 PM..