Jump to content

Simple Ideas: back to the starter (things I wish I knew…)


Recommended Posts

Background
After a full tasting menu of "Simple Ideas” for this final post in the series we return to a starter. It's an entirely random collection of points that I wished I knew when I first started dabbling with workflows in Alfred. Bear in mind these really are "simple ideas”.

How can I have multiple user inputs?
The answer, in the context of what I needed, was to use two Keyword Inputs.

How do I include screenshots in the workflow configuration?
Put the screenshots in the workflow folder (right click on the workflow name in the second column in Alfred's Preferences then choose Open in Finder)—or in a sub-folder of that folder if you wish. I now always place mine in a folder called Images within the workflow folder.

As the workflow configuration uses markdown you can then refer to any screenshot like this (for example):
![Exact name of your workflow](Images/theUA.png)

Note: you must include the initial ! and, within the square parentheses, the exact name of your workflow.

Although it's not proved to be one of my more popular workflows on GitHub I always use my Create UC image markdown link workflow to create the relevant link for me. ('UC' simply refers to 'User Configuration'.)

How to check in a workflow if a 'Find' action has failed
In my Find and replace text workflow on the Alfred Gallery I needed to trap the error that resulted from a user searching for text that did not exist within the selected text. Vitor's simple solution worked perfectly.

How to use a tmp folder in a workflow
Prompted by Vitor I've made use, where appropriate (for example in my Shrink JPEG/PNG files workflow on the Alfred Gallery), of a temporary folder which will get deleted on the user's next reboot.

How to use more than one argument in a list filter
We have already examined this of course—but it was something that I needed to learn when dabbling with workflows.

How to annihilate rougue new lines
Applescript is not a "simple idea” but, merely in passing (because perhaps you'll come across the problem in other contexts), it has a habit of adding new lines at the end of arguments it spits out. That can be very trying when you're trying to assemble variables but can instantly be solved by using Alfred's Transform Utility—the default action of which is Trim Whitespace. Of course, we've also looked at another way of doing that.

How to open Alfred's preferences quickly
If you use ⌘+ <space> as Alfred's hotkey hold down and press first <space> (to bring up Alfred's window) and then (while still holding down ) press , (comma). It takes very much longer to explain than it does to do.

In conclusion
That's it (you will doubtless be relieved to know) for the current series of 'Simple Ideas' posts.

To those who still remain seated, if not transfixed, thank you for your patience. It would be good if you managed to learn something but, if not, just be happy if you were not provoked to throw anything at your computer screen while reading the posts.

Stephen

The Simple Ideas posts

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