The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniGraffle > OmniGraffle General
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Toggling (cycling) the color of text nodes Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
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..
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Color Highlight for Found Text Scott Betz OmniOutliner 3 for Mac 1 2012-03-19 01:07 PM
Text background color in OGfl - a singular torpor RobTrew OmniGraffle General 1 2011-09-26 03:36 AM
9 steps to change text color? kknorpp001 OmniOutliner for iPad 3 2011-09-19 11:16 AM
Toggling color of selected rows between 2 or more colors RobTrew OmniOutliner 3 for Mac 1 2011-03-01 01:20 PM
How do I change background/text color, fonts, and styles? [Colour] gruber OmniFocus 1 for Mac 26 2010-06-09 02:21 AM


All times are GMT -8. The time now is 03:48 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.