Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to bind a global keyboard shortcut to open AckMate within TextMate, even if I don't have TextMate open (open the most recent project in that case). How can I do this on Mac OSX?

share|improve this question
Please explain how you want this to work. What project do you want to search? What do you want to have happen if there is no open project? On my system, TextMate does not reopen projects that were open when I quit it, so what do you want to be the object of the search window? If there is no project (or at least folder) open in TextMate, there's no AckMate option -- it's simply disabled. – Daniel Beck Jan 9 '12 at 22:35
Ok good point. I want to open the most recent project. Or if it's easier, let's just assume TextMate is open to a project. – mark Jan 9 '12 at 22:50
up vote 2 down vote accepted

Open Automator, and select to create a new Service that receives No Input in Any application.

Add a single Run AppleScript action and paste the following code:

tell application "TextMate" to activate
tell application "System Events" to tell application process "TextMate" to tell menu bar 1 to tell menu bar item "Edit" to tell menu 1 to tell menu item "Find" to tell menu 1 to tell menu item "Search Project With AckMate..." to click

Save using any name, and assign a keyboard shortcut in System Preferences » Keyboard » Keyboard Shortcuts » Services.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .