Don't see how this accesses the "Choose Color" command.
set lookupTable to "
Black {\"0\", \"0\", \"0\"}
BlueGray {\"8000\", \"8000\", \"10000\"}
Red {\"65535\", \"0\", \"0\"}
White {\"65535\", \"65535\", \"65535\"}
Manual \"Choose Color\"
"
set theColorList to find text "^\\w+" in lookupTable with regexp, string result and all occurrences without case sensitive
set theColor to (choose from list theColorList default items (item 2 of theColorList))
if theColor is not false then
set theColor to item 1 of theColor
set colorRef to run script (
find text "^" &
theColor & "
\\s+(.+)"
in lookupTable using "
\\1"
with regexp and string result without case sensitive)
else
return
end if
tell application "GraphicConverter"
activate
show tools
delay 0.2
tell window 1 -- Tools window
set background color to colorRef
delay 0.4 -- need time
end tell
-- tell window 1 to change margins with {leftMargin, topMargin, rightMargin, bottomMargin}
beep
end tell
On May 26, 2012, at 6:20 PM, Christopher Stone wrote:
set lookupTable to "
Black {\"0\", \"0\", \"0\"}
BlueGray {\"8000\", \"8000\", \"10000\"}
Red {\"65535\", \"0\", \"0\"}
White {\"65535\", \"65535\", \"65535\"}
Manual \"Choose Color\"
"
set theColorList to find text "^\\w+" in lookupTable with regexp, string result and all occurrences without case sensitive
set theColor to (choose from list theColorList default items (item 2 of theColorList))
if theColor is not false then
set theColor to item 1 of theColor
set colorRef to run script (find text "^" & theColor & "\\s+(.+)" in
lookupTable using
"\\1" with regexp
and string result
without case sensitive
) end if
Robert Poland - Fort Collins, CO