Getting out of using System Events?

Hi All, How can I get out of using System Events and do the same thing?

tell application "TextEdit"
	activate
	tell application "System Events"
		tell process "TextEdit" to keystroke (ASCII character 116) using {command down} -- opens the Font pallet
		keystroke (ASCII character 99) using {command down, shift down} -- opens the Color picker
	end tell
end tell

Any and all help is very much appreciated.

Tom

Hello

My guess is that we can’t get rid of GUI scripting to do that.

Just a comment: as ASCII character() is a dying command, it would be fine to edit this way:

tell application "TextEdit"
	activate
	tell application "System Events"
		tell process "TextEdit" to keystroke "t" using {command down} -- opens the Font pallet
		keystroke "c" using {command down, shift down} -- opens the Color picker
	end tell
end tell

Yvan KOENIG

Is there some purpose to opening the color picker?

Hi Yvan, Thanks for the heads up on ASCII characters and the rewrite. I appreciate it.

Tom
-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-
Hi Bruce, I and two friends are testing TextEdit’s ability to produce an html page.
We want to check the color tags along with all the other html tags at W3C.

Tom