mattbanks Posted March 13, 2013 Share Posted March 13, 2013 Been playing around a lot with creating new Workflows and wondered if there's any way to trigger an Action from another Action? For example, I want to use a keyword + {query} to create a new development site. First, I want to run a shell script silently. When that finishes, I want to open iTerm 2 to run a Terminal Command action in the foreground. At the same time, I'd like to use the Open URL action to open the local site in Chrome. From what I can tell, an Action can't trigger another Action in a Workflow. I know I can trigger them simultaneously, but the secondary actions in the Workflow depend on the first shell script being completely. Any way to do this other than executing commands in a single bash script or writing it out with PHP/Python/Ruby/AppleScript and triggering the scripts sequentially from a bash script? Thanks,Matt Lismpiege and alkawArow 2 Link to comment
Tyler Eich Posted March 13, 2013 Share Posted March 13, 2013 As far as I know, the only way to do this is with 'open {iterm 2 jazz / url goes here}', which would be included either after your silent code or in an 'Output > Run Script' item. There is no way to trigger other actions or workflows right now (as far as I know). Link to comment
Andrew Posted March 13, 2013 Share Posted March 13, 2013 Wiring actions sequentially into other actions is definitely in Alfred's future, but v2 is an absolutely huge change already so this is going to wait Tyler Eich 1 Link to comment
mattbanks Posted March 14, 2013 Author Share Posted March 14, 2013 Wiring actions sequentially into other actions is definitely in Alfred's future, but v2 is an absolutely huge change already so this is going to wait Great! Thanks, Andrew! I tried using an Output->Run Script but it doesn't look like it properly accepts {query}, so I'll just keep everything in one big Terminal Command for now Link to comment
Andrew Posted March 14, 2013 Share Posted March 14, 2013 Great! Thanks, Andrew! I tried using an Output->Run Script but it doesn't look like it properly accepts {query}, so I'll just keep everything in one big Terminal Command for now Make sure your escaping is correct for {query} in the shell script... take a look at some of the other workflows people have posted for examples Link to comment
mattbanks Posted March 15, 2013 Author Share Posted March 15, 2013 Make sure your escaping is correct for {query} in the shell script... take a look at some of the other workflows people have posted for examples Looks like output from a couple of the commands I was running was taking over, so I threw "> /dev/null 2>&1" on the end of those and then I'm echo'ing {query} and it's showing up properly in all output tasks 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