On May 26, 2012, at 12:01, Robert Poland wrote:
______________________________________________________________________
Hey Bob,
This is probably how I'd go about it using the Satimage.osax:
------------------------------------------------------------------------------------------------
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
------------------------------------------------------------------------------------------------
Doing it this way I only have to maintain the table.