View Single Post
whpalmer4 will correct me if I am missing something here, but I think the key problem is that the Applescript library doesn't offer us a reference to selected text (only to selected rows), so there doesn't seem to be anything very quick or elegant in sight.

Quote:
Originally Posted by kparsons View Post
I tried to just make a macro using KM and record the mouse clicks but that doesn't work well because it depends on where the program is on the screen
A workaround might be to get KM5 to open the color dialog, and then get Applescript to position and size the dialog (at top left of the screen) so that mouse click coordinates relative to the top left corner of the display can be used.

You could use a fragment of Applescript like:
Code:
tell application id "OOut"
	activate
	set strAppName to name
end tell

tell application id "sevs"
	tell window "Colors" of application process strAppName
		set position to {0, 22}
		set size to {300, 400}
	end tell
end tell
inside a KM5 macro like the one attached below, which specifies a color in terms of RGB values. Not fast, a bit klunky, but seems to work on my system :-)

--
Attached Files
File Type: zip SetColorRed.kmmacros.zip (2.4 KB, 807 views)

Last edited by RobTrew; 2011-12-16 at 03:34 AM..