[AppleScript] Search in Devonthink

Sharing and discussing custom actions for LaunchBar
Post Reply
Posts: 8
Joined: Mon Jan 18, 2010 11:48 pm

[AppleScript] Search in Devonthink

Post by sven.luetkemeier » Mon Jan 18, 2010 11:51 pm

just a quick applescript that runs a search in DEVONThink by opening a new "search window":

Code: Select all

-- Search in DevonThink via Launchbar
-- tested with Mac OS X 10.6.2, Lauchbar 5.0.2 and DEVONThink Pro Office 2.0pb8
-- requires GUI Scripting since DT Pro doesn't allow search windows to be scripted, 17.01.2010

on handle_string(mytext) -- Handler for Launchbar
end handle_string

on SearchDevon(mytext)
   tell application id "com.devon-technologies.thinkpro2"
   end tell
   tell application id "com.apple.systemevents"
      tell process id "com.devon-technologies.thinkpro2"
         keystroke "F" using {shift down, command down}
         keystroke mytext
         delay 0.4
         keystroke return
      end tell
   end tell
end SearchDevon

Posts: 11
Joined: Sun Aug 14, 2011 2:55 am

Re: [AppleScript] Search in Devonthink

Post by philosopher.king » Mon Nov 14, 2011 9:22 pm

Hi Sven:

I have devonthink as well, and i really like to know how you manage to search Devonthink with launchbar, can you be more specific how how to do it? Thank you in advance. :D

Post Reply