View Single Post
The nodes in my diagrams tend to be either gray, black, or red text.

By assigning this script to a keystroke with something like Keyboard Maestro or FastScripts, I can select a shape, and toggle the color of its text between black, gray, red.

Code:
property plstBlack : {0, 0, 0}
property plstGray : {32767, 32767, 32767}
property plstRed : {65534, 0, 0}

tell application id "com.omnigroup.OmniGrafflePro"
	try
		set lstSeln to selection of front window
	on error
		return
	end try
	if lstSeln = {} then return
	
	tell (first item of lstSeln)
		if its text ≠ "" then
			tell its text
				set lstColor to its color
				
				if lstColor = plstGray then
					set its color to plstRed
				else if lstColor = plstBlack then
					set its color to plstGray
				else
					set its color to plstBlack
				end if
			end tell
		end if
	end tell
end tell
--

Last edited by RobTrew; 2011-03-01 at 01:39 PM..