I'm having trouble with this script...

tell application "System Events"
		tell process "TextEdit"
			key down command
			delay 5
			click at {527, 301}
			delay 5
			key up command
		end tell
	end tell

Basically all I want this script to do is hold down the (command)? idk the one with a little apple on it key then click at 527,301 then release the apple key. Am I doing it incorrectly? Any hjelp would be awesome

Add : “tell application “TextEdit” to activate” at the start to bring the window up.
It might help if you told us what you were trying to click, but it looks okay as is.

Thanks for your help I’m going to try right now :slight_smile: