UI scripting problem with BibDesk

Hi all
I am trying to write an applescript to create a new smart group (like a smart folder in iTunes) in Bibdesk. Here’s what I have (using UI scripting):

property the_tag : "land"

tell application "BibDesk"
	activate
	tell application "System Events"
		tell process "BibDesk"
			tell menu bar 1
				click menu item "New Smart Group" of menu "Database"
			end tell
			tell window 1
				set value of text field 1 of group 2 of scroll area 1 of group 1 of sheet 1 to the_tag
				set value of combo box 1 of scroll area 1 of group 1 of sheet 1 to "Keywords"
				click button "OK" of sheet 1
			end tell
		end tell
	end tell
end tell

Everything works as expected - I can see the tag text “land” appear in the text box & the combo box select “Keywords” – but the new Smart Group which is created doesn’t actually have the values (Keyword contains land) that are set in the script – its criteria are empty.

Any advice would be appreciated.
Derick

I noticed a scripts link at the bibdesk site. Is it scriptable or was that for unix scripts?

Yes, it’s applescriptable – but at this point the dictionary doesn’t access groups directly so you need to use UI scripting.