Jump to content

How to make a Universal Action a Workflow Action?


Recommended Posts

Posted (edited)

There are various Universal Actions to which I want to assign a hotkey, so that:

  • When some text is highlighted, I can immediately save it as a new snippet rather than first having to bring up Universal Actions and then select 'Save as Snippet' 
  • When a file is selected, I can immediately action it with my hotkey rather than having open up Universal Actions and select the action manually.
     

How can I do this?


I've searched quite a lot but can't find an answer. The 'Action in Alfred' is really invaluable for coding noobs like me, but it only has 6 actions that can be selected and ofc Universal Actions isn't one of them. For a future development I think people like me would find it extremely useful for the 'Action in Alfred' option to allow you to select any Universal Action configured so that it doesn't require extra coding, at least any Universal Actions that are configured by default into Alfred. 

image.thumb.png.bf6731a7d5b69738ba6b0d836bceaaa1.png

image.thumb.png.f1aff2168f4d471c1fd6f8af2f2962c5.png

 

Edited by kenanmike
  • kenanmike changed the title to How to make a Universal Action a Workflow Action?
  • 2 years later...
Posted (edited)

I have the same question. I found this thread, which seems to say that it's possible using a custom workflow. However, I have not been able to get it to work yet. Perhaps @JJJJ or @Stephen_C could weigh in with a bit more detail on how to achieve this?

Edited by nk9
Posted

I think it would be helpful to explain exactly what you want to achieve: it's much easier if you do that, with a specific example, then someone may be able to come up with a suggestion that helps you with what you want to do.

 

Generally, you can't create shortcuts to Universal Actions (i.e., to use them without first using your Universal Actions hotkey)—but you may be able to achieve what you want by approaching the problem in a different way.

 

Stephen

Posted

Thanks for the quick reply! I can't speak for OP, but I have installed and tweaked the "Word and character count" Universal Action to also show the lines in the given text.

 

image.thumb.png.fd0a5e44e51cc7582b436bd7305b5a7b.png

 

My goal is to be able to select some text, press a hotkey, and have Alfred invoke the workflow/UA and display up the "Word, character, line count" alert.

 

And… I've just worked out that the easiest way to do this is to simply add a Hotkey trigger to the above workflow and also connect it to the first "Args and Vars" utility block:

 

image.thumb.png.6e4e50ca0d472627e0928981a88a9751.png

 

This works by completely bypassing the UA part of this. I guess this probably means I should have started a new thread. But if there's another way to do this, which still works through the universal actions, I'd be open to hearing about it as well!

Posted

I think that's exactly the way to do what you want (and the workflow is, incidentally, one I wrote!). Just one tip: take a look at the Alfred help page on Tips for working with hotkeys and you'll see you may be able to make your hotkey work even more quickly (if you've not already used that tweak).

 

Stephen

Posted

Look at that! Well, thank you for a very useful little workflow. 🙂 And I have now sped up the hotkey invocation and it's working well and faster, much appreciated!

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