Skip to content

Instantly share code, notes, and snippets.

@dansheffler
Created July 12, 2014 20:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dansheffler/d7d862546cff0c95918e to your computer and use it in GitHub Desktop.
Save dansheffler/d7d862546cff0c95918e to your computer and use it in GitHub Desktop.
# Open BibDesk and clear any search or group selection
tell application "BibDesk"
do shell script "open -a bibdesk"
set libGroups to the library groups of the front document
set group selection of front document to libGroups
set filter field of front document to ""
end tell
# Bring the main BibDesk window to the front
set theTitle to "mybib.bib"
tell application "System Events"
tell process "BibDesk"
set frontmost to true
perform action "AXRaise" of (windows whose title is theTitle)
end tell
end tell
# Put the cursor in the search box.
tell application "System Events"
tell process "BibDesk"
tell menu bar 1
tell menu bar item "Edit"
tell menu "Edit"
tell menu item "Find"
tell menu "Find"
click menu item "Database Search"
end tell
end tell
end tell
end tell
end tell
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment