Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Create a Services-based application launcher System
The services menu is available in every application, although the options within it are only available when copy or paste are active (depending on whether the service takes input, produces output, or both). Because this menu is nearly always accessible, it is possible to assign a shortcut to an item in it that will almost always be accessible. This method is not always available, but the upside is that there is not third party daemon always running in the background listening for keys.

In this example, the shortcut starts the screensaver, but it would be equally simple to start an application. To make this work, you'll need the donationware application ThisService, which creates a service from any script.

Open the Produces output.scpt from the AppleScript starting points that come with ThisService. The 'produces output' means the application is available without having something selected to copy. Insert the desired AppleScript code between on process() and end process, and save it (probably as a new name in a new location). In this example the whole script will look like this:
on process()
  tell application "ScreenSaverEngine"
  end tell
end process
Open ThisService, name your service, pick the script you created, select 'Produces output,' and assign your shortcut. (I used F6, which would not work from ThisService, but you can assign it later through System Preferences.) Now just make sure the focus is somewhere that would accept pasting, and test your service.

[robg adds: I haven't tested this one.]
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (6 votes cast)

Create a Services-based application launcher | 2 comments | Create New Account
Click here to return to the 'Create a Services-based application launcher' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create a Services-based application launcher
Authored by: MacTipper on Aug 25, '08 10:20:43AM
While this may seem beneficial, the disadvantage is that the items made by ThisService are active all the time. Don't believe me? Open up activity monitor and do a search for "ThisService". You'll find that your services are in there taking up Memory.

Whether this is cause for alarm is your choice.


[ Reply to This | # ]
Create a Services-based application launcher
Authored by: wootest on Aug 25, '08 11:14:44AM

This is true and this was the way the service part was designed. My first prototype went down when the service session was finished, but I found that there was a noticeable delay on startup, and that the delay went away if the service simply hung around.

Resource usage is important though, and it's not impossible that the next generation of services will quit after a few minutes or hours or so, combining the two approaches.

/Jesper, author of ThisService

[ Reply to This | # ]