Skip to content

Instantly share code, notes, and snippets.

@jgarber623
Created June 18, 2010 03:36
Show Gist options
  • Select an option

  • Save jgarber623/443192 to your computer and use it in GitHub Desktop.

Select an option

Save jgarber623/443192 to your computer and use it in GitHub Desktop.
A simple AppleScript to launch Last.fm.app and hide its window
-- 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
@alexreg
Copy link

alexreg commented Jan 3, 2013

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.

@afreeorange
Copy link

Delightful. Thank you!

@bryankennedy
Copy link

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