FileMaker 11 Inspector

I’m a long-time FileMaker Pro developer who welcomes the new Inspector in FileMaker 11. However, I have found myself missing my keyboard shortcuts for changing the selected field. I used to be able to press Command + Option + F to invoke the field selector; in FM 11 the options are to either double-click the field or to press (or tab to) a small button in the Inspector.

My first inclination was to use Automator to record the action of clicking on the button. This worked but the mouse moving across the screen became a hindrance.

Using Accessibility Inspector and a hint I found on this site regarding scripting an Adobe product, I came up with the following script:

tell application "System Events"
	tell process "FileMaker Pro Advanced"
		set frontmost to true
		tell window "Inspector"
			click button "Data"
			tell scroll area 1
				click button 1
			end tell
		end tell
	end tell
end tell

I added this script to a FileMaker service I created in Automator (using the Run Applescript step) and assigned the command + option + F keystroke to the service.

This solution isn’t perfect, mind you – the Inspector must be open, and there’s a noticeable delay between the keystroke and execution. My programming chops aren’t sufficient to tell if the Inspector is open or not, and I don’t have the time at the moment to figure that out… a project for another day, I suppose.

Anyway, hopefully this little snippet with help other FileMaker power-users who are looking for a way to script FileMaker’s Inspector.

Peter

Model: MacBook Pro i5
Browser: Safari 531.22.7
Operating System: Mac OS X (10.6)

If you don’t know the name of the button in a window - what code can you use to find its name ?