I'm running OS X 10.6 and I want to use applescript to click on the "File Name" radio button of the finder window when the search is open. (It defaults to "Contents")
I used the UI Browser (below) and came up with a path, but Applescript is giving me some errors so I must be doing something wrong. I've posted my code and screen shots below:
Code:
tell application "System Events"
activate application "Finder"
click checkbox "File Name" of radio group 1 of group 1 of splitter group 1 of window 1 of application "Finder"
end tell
Screen Cap:

Code From UIElementInspector
<AXApplication: “Finder”>
<AXWindow: “Searching “UIElementInspector””>
<AXSplitGroup>
<AXGroup>
<AXRadioGroup>
<AXCheckBox: “File Name”>
Attributes:
AXRole: “AXCheckBox”
AXRoleDescription: “check box”
AXHelp: “(null)”
AXValue: “1”
AXEnabled: “1”
AXFocused (W): “0”
AXParent: “<AXRadioGroup>”
AXWindow: “<AXWindow: “Searching “UIElementInspector””>”
AXTopLevelUIElement: “<AXWindow: “Searching “UIElementInspector””>”
AXPosition: “x=1357 y=149”
AXSize: “w=75 h=17”
AXTitle: “File Name”
Actions:
AXPress - press