andy Posted June 13, 2020 Share Posted June 13, 2020 (edited) Hi guys, I'm trying to create my own workflow that will let me switch project workspace setup quickly (I have multiple active projects). These are what I want the workflow doing : 1. When I type ws then alfred will display available options, for example : - Project A - Project B - Project C 2. if I choose Project A and press enter, it should : 3. Quit all opened apps except Mail app, Forklift and Notes if I choose Project A, quit all opened apps except Mail app and Forklift if I choose Project B and so on. 2. Reveal folder Documents/Project A with Forklift 3. Open url http://localhost/Project A with chrome browser 4. Open folder Project A with Visual Studio Code 5. Open Fork app for git commit My questions are 1. I use keyword input to create ws keyword. But how can I create options Project A, Project B and Project C that will be used as variable in the next actions? 2. I know I can I quit all opened apps with exception using this workflow but how can I call this workflow inside my workflow with and use the chosen options variable (Project A, Project B )? Thanks and sorry for my noob question. Edited June 13, 2020 by andy Link to comment
vitor Posted June 14, 2020 Share Posted June 14, 2020 15 hours ago, andy said: 1. I use keyword input to create ws keyword. But how can I create options Project A, Project B and Project C that will be used as variable in the next actions? What you want is a List Filter Input connected to a Conditional Utility that will act depending on the Arg. If you want variables to propagate through, look at the Argument and Variables Utility. 15 hours ago, andy said: 2. I know I can I quit all opened apps with exception using this workflow but how can I call this workflow inside my workflow with and use the chosen options variable (Project A, Project B )? You couldn’t easily and without relying to some trickery, but I’ve just updated the Workflow to make it easier for you by adding External Triggers. How to call them is up to you. A simple way would be to have an Argument and Variables Utility with the apps as the Argument connected to a Call External Trigger Output. Link to comment
andy Posted June 15, 2020 Author Share Posted June 15, 2020 Vitor, Thanks alot for your help. Anyway how can I connect to other action after Call External? Because it looks like there is no exit connector from Call External to other action. Link to comment
vitor Posted June 15, 2020 Share Posted June 15, 2020 You wouldn’t be able to move the connector to another Workflow anyway. Click where it says Workflow Triggers… Link to comment
andy Posted June 16, 2020 Author Share Posted June 16, 2020 (edited) So I have to put Call External in the last order of actions? Quote Click where it says Workflow Triggers… I did Edited June 16, 2020 by andy Link to comment
vitor Posted June 16, 2020 Share Posted June 16, 2020 I see what you mean. You don’t need to have just one connection going out or in of one place. Connect your Project B output to the Reveal in Finder directly. Try different things. Link to comment
andy Posted June 16, 2020 Author Share Posted June 16, 2020 I'm able to connect the 'Conditional utility' to 'Reveal in Finder' then connect to 'Call External'. What I want to do with 'Call External' is, I want to close all apps including Visual StudioCode (so the current opened folder by Visual Code is closed), but in the next action I need to open Visual Studio Code again and opening the new folder. If I place 'Quit Apps' in the last order, then Visual Studio Code will be opened in the early steps, and then later will be closed by Quit Apps'. Link to comment
vitor Posted June 16, 2020 Share Posted June 16, 2020 If it’s happening too fast, add a Delay Utility. Try things. Alfred’s documentation is pretty good and easy to follow, I’m basically linking you to every feature one by one. 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