Unselect an object in Numbers


In Numbers, is there a way to unselect a cell or a table thru AppleScript ?
Manually, it’s easy : just click in the working area out of a table.

Yvan KOENIG (VALLAURIS, France) vendredi 13 février 2015 15:58:06

Don’t worry, I got it.

my deselect()
on deselect()
	# Utilise CliClick disponible à : http://www.bluem.net/en/mac/cliclick/
	# scroll area 1 : area containing tables
	# scroll area 2 : area containing the sheet titles
	# if a table is selected we may have a 3rd scroll area
	# scroll area 3 : area containing the inspectors
	# if a cell is selected we may have 4 scroll areas
	# scroll area 3 : area at the very bottom of the window used to display formulas
	# scroll area 4 : area containing the inspectors
	tell application "Numbers"
		tell application "System Events" to tell process "Numbers"
			set frontmost to true
			tell first window to tell first scroll area
				set {xLeft, yTop} to position
				tell me to do shell script "/usr/bin/cliclick c:" & xLeft & "," & yTop
			end tell
		end tell
	end tell
end deselect

Yvan KOENIG (VALLAURIS, France) vendredi 13 février 2015 16:18:42

Hello all

A friend just sent me a trick :

tell the table someTable
set locked to false
end tell

unselect what was selected in it.

Yvan KOENIG (VALLAURIS, France) samedi 14 février 2015 15:41:59