rab523 Posted August 9, 2013 Share Posted August 9, 2013 In Alfred 1, there was a quick and direct way to create a workflow by simply choosing "automator" and then choosing the automation file I wanted my keyword to activate. I am totally lost as to how this is done correctly in Alfred 2. Help is appreciated. Link to comment
bmazin Posted August 9, 2013 Share Posted August 9, 2013 If you go to the workflow section in the Alfred 2 Preferences. Click the "+" (bottom right), then use the template: Templates > Files and Apps > Launch file group from keyword. The workflow is created, double click the workflow elements to edit your keyword trigger and to drag your Automator file into the "Launch Apps/Files" Link to comment
rab523 Posted August 9, 2013 Author Share Posted August 9, 2013 If you go to the workflow section in the Alfred 2 Preferences. Click the "+" (bottom right), then use the template: Templates > Files and Apps > Launch file group from keyword. The workflow is created, double click the workflow elements to edit your keyword trigger and to drag your Automator file into the "Launch Apps/Files" This launches the automator app and does not actually carry out the task. The old version ran the automator task automatically and in the background. Is there a way to accomplish the task this way with workflows in Alfred 2? Link to comment
Andrew Posted August 9, 2013 Share Posted August 9, 2013 This launches the automator app and does not actually carry out the task. The old version ran the automator task automatically and in the background. Is there a way to accomplish the task this way with workflows in Alfred 2? If you place the automator script within the workflow's folder (Use 'reveal in finder' on the workflow's popup menu in the list'), then setup a script object (bash) and use the automator command. You can test out the automator command in terminal too if you need to tweak things. I've been thinking about adding an automator action into the workflows to make things a little easier for this (in v2.1). For now, let me know if you need any help with your workflow to get this working Cheers, Andrew Link to comment
bmazin Posted August 13, 2013 Share Posted August 13, 2013 Try saving the automator workflow as an Application, this way it will open and run as a separate application. If you need to edit the workflow open the Automator app, Go to "File > Open" and select the file. Link to comment
emiel Posted August 15, 2013 Share Posted August 15, 2013 (edited) If you place the automator script within the workflow's folder (Use 'reveal in finder' on the workflow's popup menu in the list'), then setup a script object (bash) and use the automator command. You can test out the automator command in terminal too if you need to tweak things. I've finally upgraded to Alfred 2 yesterday and regenerated my +80 Alfred v1 hotkeys into Alfred 2 workflows. Yes, I'm a hotkey power user, I even created one for the new 'Alfred Preferences' app! The hotkeys in v2 seem to trigger the actions slightly slower than v1… but that's another topic. I have also created a few Alfred v1 'extensions' connected to Automator '.workflow' files. With Alfred v1 I assigned hotkeys/keywords to them. Somehow I can't reproduce this in Alfred v2. Please guide me through the steps I need to take in Alfred 2. I'm not a scripts programmer… I've managed to place a (Automator) .workflow file into the (Alfred 2) 'workflow' folder but I don't get what you mean with "then setup a script object (bash) and use the automator command". Do I need to add a 'Run Script' action to the workflow, set the 'language' to '/bin/bash'? Then what? What to I put into the 'Script' field to get this working? Sounds complicated… Edited August 15, 2013 by emiel Link to comment
raguay.customct Posted August 15, 2013 Share Posted August 15, 2013 Not really. In the Script block, just type: automator NameOfWorkflow.workflow Where you place the name of your workflow you copied to that directory. That should do it. Therefore, if you workflow was named "dothis", the script would be: automator dothis.workflow Get it? Link to comment
emiel Posted August 15, 2013 Share Posted August 15, 2013 Got it. Thanks for the hint. Didn't work at first… since my .workflow files contained filenames with spaces. But now it works. Easy! (…) Not as easy as v1 though. Figured that one out without signing up for a forum and posting a question about it. Link to comment
raguay.customct Posted August 15, 2013 Share Posted August 15, 2013 If you need spaces on it, just surround with ". Yea, 2.1 is suppose to have a box for doing automator workflows directly. That will make it like ver 1. Link to comment
rab523 Posted November 13, 2014 Author Share Posted November 13, 2014 If you place the automator script within the workflow's folder (Use 'reveal in finder' on the workflow's popup menu in the list'), then setup a script object (bash) and use the automator command. You can test out the automator command in terminal too if you need to tweak things. I've been thinking about adding an automator action into the workflows to make things a little easier for this (in v2.1). For now, let me know if you need any help with your workflow to get this working Cheers, Andrew Hi - I have been fiddling with this off any on for a while now and still can't figure it out. Would you be willing to post a few screenshots of what this process looks like? I do not fully understand from your description. Link to comment
raguay.customct Posted November 14, 2014 Share Posted November 14, 2014 Hi, I wrote a quick tutorial on how to do this. You can read it here: http://customct.com/posts/tutorials/Alfred/Running-Automator-and-AppleScripts-in-Bash This should help clear up what you do not understand. If you have more questions, just let me know. Richard Andrew 1 Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now