Wednesday, April 3, 2013

How to Automate Anything with Alfred Workflows (Then Show Us Your Best)

How to Automate Anything with Alfred Workflows (Then Show Us Your Best)Last month, the Mac application launcher Alfred updated with a ton of improvements, but the most interesting feature is the new Workflows system that makes it easy for anyone to create their own speed-boosting shortcuts. We want to see yours, but if you haven't played around with Workflows yet we've got you covered there too.

The addition of Workflows into Alfred seems minor at a glance, but they allow you to do all sorts of productive things (note: while Alfred is free, workflows require the powerpack for about $21) easily with hardly any coding skills at all. The best part is they're not stuck on your computer, you can share them with people, and download other people's workflows to use for yourself. One of my favorites is a set of Spotify controls that allows you to quickly search for and play tracks without ever actually opening the Spotify window.

So, let's take a look at how to get started with your own workflows before we do a little show and tell.

How to Make Your Own Alfred Workflows

How to Automate Anything with Alfred Workflows (Then Show Us Your Best)Workflows are a little confusing at a glance, but they're actually very simple when you start messing around with them. A workflow is broken down into four parts:

  • Triggers: Usually a system-wide hotkey, but this can also include when you access a file or folder.
  • Inputs: These are the keywords you type into Alfred. They can also include file filters.
  • Actions: Actions are the scripts that run after you type in the input. This can include loading an AppleScript, launching an application, opening a web site, and more.
  • Outputs: Outputs are exactly what you'd expect. These include something getting copied to the clipboard, a notification posting, or a script running.

Alfred includes a bunch of sample workflows that are worth looking at to get an idea of how they work, but lets go ahead and make a very simple workflow to temporarily pause iTunes:

  1. Open Alfred's preferences and click on "Workflows."
  2. Create a new workflow by clicking the "+" sign, and select "Blank workflow."
  3. Name the workflow iTunes Pause (or whatever you want) and click Ok.
  4. Click the "+" in the workflows upper right corner, and select "Triggers," and then "Hotkey."
  5. Enter whatever hotkey you want (I did Shift+Command+P) and click Ok.
  6. Click the plus arrow and again, select "Actions" and select "Run NSAppleScript."
  7. Paste this code into the AppleScript box:
     on alfred_script(q) tell application "iTunes" pause delay 180 play end tell end alfred_script 

    and click "Ok."

  8. Now, mouse over the hotkey, and click on the tab on the right. Drag the arrow over to the AppleScript box.

Congratulations, you just made your first (admittedly rudimentary) workflow! You can now click the "Share" button in the bottom left corner to export the file, and send it over to anyone you want.

Share Your Workflows

The process can be as simple as above for a quick hotkey to trigger an AppleScript, or you can make it much more complicated by creating your own search structures with PHP. Of course, the best part is that you can benefit from other people's hard work easily, and you can browse through a lot of what's been created so far over on the Alfred forums. If you're ever curious how a workflow works, you can ask in the forums, or just install it in Alfred and double click any of the nodes to see the code.

With that in mind, we're going to turn it over to you: show us some of the workflows you've made, or the ones you're using.

Source: http://feeds.gawker.com/~r/lifehacker/full/~3/0Cbs4Ll1lh4/how-to-put-together-and-share-your-alfred-workflows-and-show-us-yours

DNS Changer ernest borgnine ESPYs 2012 venus williams Freeh Report direct tv wimbledon

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.