Jump to content

Simple ideas: I've got a little list… (1)

Recommended Posts

This is the first of two posts exploring uses of Alfred's List Filter Input. If you don't know about List Filters do check the link because (a) they are very useful and (b) I shan't cover every aspect of them in these posts.

This is not intended to be, of itself, a useful workflow but, rather, to show how List Filters may be used.

The skeletal workflow

1. The List Filter starts the workflow and shows the keyword used to trigger it (ahp in this case). (If you sometimes see a keyword in italics that is because the keyword has been set in the Workflow Configuration.) Here's what the List Filter looks like when you double click on it:

Note, at the top of the List Filter, we choose to have the keyword followed by a space and an optional argument. That allows us to see the entire list of items as soon as we type the keyword—and to press space followed by a typed search term to display the item we want. At the bottom right of the List Filter we choose "Alfred learns result order based on usage” so that frequently used items rise to the top of the list as we use the workflow (see Understanding Result Ordering).

The key thing to note is that each item in the list has two arguments separated only by a comma. The first argument is a URL for an Alfred help page and the second argument is a friendly name for the page. The significance of the second argument will become apparent in the second of these posts.

2. Because we have two arguments for each item in the list and because for the purposes of this post we're going to use only one we use Alfred's Split Arg Utility to split the two arguments. Here's what it looks like when we double click it:

We split with a comma (because that's how the arguments in the list are divided) and we output as arguments (because that's what we need in the next part of the workflow).

3. All we need is the URL (at the moment) so we just use a simple Automation Task to grab the first argument—with no Automation Task configuration needed.

4. We're home and dry! The URL is passed to the Open URL Action—which we have no need to modify if we wish the URL to open in our default browser.

In conclusion
I appreciate none of that is very exciting. However, in the next post we'll start messing around with some simple variables and use both of the arguments in the List Filter. Sadly no popcorn will be served but please remain in your seats.


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...