Jump to content

Multiple keywords for a single script filter


Recommended Posts

Hello,

 

I don't know if it's possible to emulate this behavior with a workflow trick (other than duplicate the script filter), but I think it would be useful to allow to have multiple keywords for a single script filter.

It could be used to set multiple language keywords (like "weather" and "météo" in french), or just add a shortcut (like "w" or "wiki" for a wikipedia autocomplete workflow)

Edited by Ingolmo
Link to post
Share on other sites
  • 4 years later...

Hi @Ingolmo - I'm new to Alfred, and was wondering if you ever figured out how to use more than one keyword in a script filter? 

 

I'd like to avoid duplicating the script filter a bunch of times with different keywords (within the same workflow), and haven't come across any discussions of this issue beyond your post.

 

Thanks for your help!!

Link to post
Share on other sites

@Jasondm007 Given that the original post is over four years old, workflows have evolved significantly since. :)

 

In Alfred 3, you could add multiple keyword objects before your script filter, one for each keyword. Set them to "No argument" and you'll then be able to hit Enter to launch your script filter. It requires one more press of the Enter key, but may suit your needs :)

 

However, given the example from the original post using "w" and "wiki", these aren't necessary, as you can just type "w" and press the Tab key when the Wiki workflow is selected, and Alfred will auto-complete the keyword "wiki", ready for you to type your search term.

 

Cheers,
Vero

Link to post
Share on other sites

Hi @Vero,

 

Thanks for getting back to me and for the suggestion! I really appreciate it.

 

Would your method work for script filters that are running queries within Alfred's search box (and then providing you with the appropriate options)?

 

For example, I'm a big fan of Paul Wirth's Do Not Disturb workflow, but I can never remember the precise keyword. It's setup so that when you type "dnd" it will run a query to see if your Do Not Disturb setting is already on. If it is, it will tell you that it's on and then it allows you to select whether you want to turn it off. Of course, if it's off, it does the opposite (See screenshots: normal.jpg and scriptfilter.jpg below).

 

normal.thumb.jpg.378b00d0bfebd90afb4be285791dc9f2.jpg

 

scriptfilter.jpg.dbabfd6dab164b39dff3750fe080d3b3.jpg

 

To get around having to remember the precise keyword, I just duplicated the script filter with a new keyword (e.g., not and notifications) and then reattached everything (see screenshot duplicated.jpg).

 

duplicated.thumb.jpg.ecd5418d0ab723936326e2c0599f7aee.jpg

 

This seemed a little odd, so that's why I posed my question yesterday. I was hoping that you could simply type something like "dnd" OR "notifications" in the script filter, but this seemed like an OK workaround.

 

I tried using the method you describe above (e.g., creating multiple keywords and then having them feed to the script filter or even a normal script), but I couldn't get it working. The query that determines whether your Do Not Disturb setting is on no longer works when using this method.

 

As you can tell, I'm new to Alfred (and am not a programmer). Any advice you may have is most appreciated. 

 

Thanks for your help!!

 

Edited by Jasondm007
Link to post
Share on other sites

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