Created
June 18, 2010 03:36
-
-
Save jgarber623/443192 to your computer and use it in GitHub Desktop.
A simple AppleScript to launch Last.fm.app and hide its window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- A simple AppleScript to launch Last.fm.app and hide its window | |
tell application "Last.fm" to activate | |
tell application "System Events" to keystroke "w" using command down | |
tell application "Finder" to activate |
Nice little script, this is. Thank you very much! It's a shame that the Last.fm app ignores several big Apple/Mac design guidelines and conventions (this isn't the only one), but this is a handy workaround nonetheless.
Delightful. Thank you!
Thanks! This worked for me, but wasn't consistent until I added a short wait to the AppleScript at the top of the file before the tells.
delay 5
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Activate and close Last.fm.app
I love Last.fm's native OS X app and I prefer to launch it at login. The trouble is the app doesn't respect OS X's "hide" option in Login Items.
Requirements
Usage
Open up this AppleScript in the AppleScript Editor and save it as an application. Add the resulting application to your Login Items and you're off to the races!
For an even slicker experience, try the following:
Your application should now run without showing up in the Dock. Last.fm.app will now launch and happily hide itself away on login!