Further to a similar script for OmniGraffle:
Attaching a script like this to a keyboard shortcut, using something like Keyboard Maestro or Fastscripts, enables one to quickly switch the text color of selected rows. (This version affects only the topic text).
Attaching a script like this to a keyboard shortcut, using something like Keyboard Maestro or Fastscripts, enables one to quickly switch the text color of selected rows. (This version affects only the topic text).
Code:
-- TOGGLE/CYCLE TEXT OF SELECTED ROWS BETWEEN BLACK, GRAY AND RED property plstBlack : {0, 0, 0} property plstGray : {32767, 32767, 32767} property plstRed : {65534, 0, 0} tell application id "com.omnigroup.OmniOutlinerPro3" try tell front document set idTopic to id of topic column set refRows to a reference to (selected rows where topic is not "") end tell on error return end try if (count of refRows) < 1 then return -- GET THE NEXT COLOR IN THE SEQUENCE tell (text of cell id idTopic of first item of refRows) set lstColor to its color if lstColor = plstGray then set lstNewColor to plstRed else if lstColor = plstBlack then set lstNewColor to plstGray else set lstNewColor to plstBlack end if end tell -- AND APPLY THE NEW COLOR TO ALL SELECTED ROWS set color of text of cell id idTopic of refRows to lstNewColor end tell
Last edited by RobTrew; 2011-03-01 at 01:19 PM..