Jump to content

"Taken" workflow - Freak out your friends!


Recommended Posts

A while back a mate managed to lock me out of my room and and proceeded to tinker with my computer while I watched helplessly through a window. I wasn't going to take that lying down so I used my iPad to airplay Liam Neeson's immortal line from Taken to the speakers in my room. My friend was suitably freaked out :D Since I've been having fun using Alfred 2 to automate every tiny little function on my computer I thought I might as well throw this workflow together. It uses an Applescript to:

  • Pause iTunes if it's playing 
  • Set the computer's volume to maximum
  • Play the audio clip
  • Set volume and mute to their original settings
  • Resume iTunes playback (if it was playing)

Taken%20-%20Screenshot.png

 

To use it you'll need to edit the script in the workflow with the path to the audio file (a copy of which is bundled with the workflow). More detailed instructions:

  • Import the workflow into Alfred
  • Double click the Run Script tile in the workflow
  • Click "Open workflow folder" at the bottom right
  • Note the file path to Taken_Audio.aif (you can find this by clicking and dragging the aif into Alfred  ;) )
  • Back in the Run File tile, scroll to the bottom of the script and edit the path to the audio file (it's located under "# Play the clip"). It's mostly filled out for you, all you really need to add is the long string of characters from the end of the workflow folder name. 
Download: Taken

Keyword: taken

 

Here's a standalone copy of the audio: Taken Audio

Edited by Subject22
Link to comment

nonsense but funny.  ^_^

don't think you need this terminal thing for the sound..

I used a sound file in a workflow a while ago and there was no need for the terminal. Just the afplay command.

 

afplay /Users/Daniel/Dropbox/Alfred' '2/Alfred.alfredpreferences/workflows/user.workflow.C45FE129-2A09-4B30-AEB4-47BF282E78FB/move.aif
Link to comment

Haha, if that's your reaction, then it's done its job :D The funniest thing to me is that the audio clip's been downloaded twice as many times as the actual workflow xD I guess there's a dearth of good soundbites out there. Now that I think about it, I did have to do a little work to get that one. YouTube -> mp4 -> iMovie -> Export audio

You're right about not needing Terminal. For some reason I keep using tell app "Terminal" instead of do shell script, I have no idea why. I've changed that, and also bundled the audio with the workflow. The user will still need to specify the file path though, as the name of the workflow folder appears to be generated differently each time it's imported. I don't know how to get around that.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...