Jump to content

Use auto expanding keywords for snippets as triggers for workflows


Recommended Posts

In Alfred 3 there are automatically expanded snippets by keywords. They are awesome and work almost flawlessly after enabling the appropriate accessibility feature.

 

As I understand, as you already have the code for detecting those keywords (I guess, by catching the consecutive key presses?), it shouldn't be hard to allowing using those keywords to trigger workflow actions.

 

This would allow us to call workflows from any textual input. So, instead of at first calling Alfred or a specific command here, you could just write the keyword for this command and alfred would either call the action or present you with the alfred input window for your workflow.

 

After calling the workflow the keyword should be deleted from the input, and you should have a way to replace it with the workflow's result.

 

That's the basic what could be done with catching the keywords, but what would be even cooler — catching non-static keywords by regexps. Instead of a static keyword like `foobar`, you could set it to `foo(\d+)bar`, for example, and it would call the workflow as soon as you'd write somewhere `foo1bar`, `foo3434bar` etc., with the variable parts of the regex match as input you could use in your workflow.

 

This would open a lot of possibilities for workflow authors.

Link to comment
Share on other sites

  • 1 year later...

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