selfmade69 Posted June 16, 2023 Share Posted June 16, 2023 (edited) What I would like to achieve: I want to run workflow (NightShift) with "night 25" passed to it from another workflow so that I will have 25% of night shift levels without typing "night 25" on alfred search bar window. What I did: I set inbound configuration in the NightShift's script filter with 25 as argument: I set Call External in another workflow: However, it just doesn’t pass itself but rather shows in alfred search bar window: Any idea how I can avoid alfred displaying the search bar window and just pass "night 25"? Edited June 16, 2023 by selfmade69 correction Link to comment
vitor Posted June 16, 2023 Share Posted June 16, 2023 It’s impossible to say exactly what you need to change without knowing which workflow you’re using (do you have a link?), but you need to connect externally to the Run Script, not the Script Filter. The Script Filter is what shows the options and you’re connecting to that, when you want to connect to what makes the changes. Probably; again, only looking at it can we say for sure. Link to comment
selfmade69 Posted June 16, 2023 Author Share Posted June 16, 2023 (edited) 29 minutes ago, vitor said: It’s impossible to say exactly what you need to change without knowing which workflow you’re using (do you have a link?), but you need to connect externally to the Run Script, not the Script Filter. The Script Filter is what shows the options and you’re connecting to that, when you want to connect to what makes the changes. Probably; again, only looking at it can we say for sure. I am about this workflow https://www.packal.org/workflow/nightshift However I think the main thing is that I want to pass the command "night 25" from another workflow on it so that Nightshift workflow will do whats necessary. Edited June 16, 2023 by selfmade69 Link to comment
vitor Posted June 16, 2023 Share Posted June 16, 2023 3 minutes ago, selfmade69 said: I want to pass the argument from another workflow on it with "night 25" That would still invoke the Script Filter, which you’re trying to avoid. Took a quick look at the code and it seems the comment above holds. Essentially you set it up correctly but on the wrong object. Set up the Inbound Configuration (or connect an External Trigger) on the Run Script instead. Link to comment
selfmade69 Posted June 17, 2023 Author Share Posted June 17, 2023 (edited) 14 hours ago, vitor said: That would still invoke the Script Filter, which you’re trying to avoid. Took a quick look at the code and it seems the comment above holds. Essentially you set it up correctly but on the wrong object. Set up the Inbound Configuration (or connect an External Trigger) on the Run Script instead. Not sure why but it worked! I set Inbound Config on the bash Run Script which is: I also had to disconnect it from the trigger as it got other commands running as the same, I then made a copy of it and connect it to the Script filter. Could you please explain how come the Call External still works when the Run Script isn't even connected to the script filter, where the code actually is: Edited June 17, 2023 by selfmade69 details Link to comment
vitor Posted June 17, 2023 Share Posted June 17, 2023 1 hour ago, selfmade69 said: I also had to disconnect it from the trigger You don’t have to do that. 1 hour ago, selfmade69 said: Could you please explain how come the Call External still works when the Run Script isn't even connected to the script filter The Script Filter isn’t running code to change the Night Shift value, it’s only there to present an interface for you to insert a value. That value is then passed to the Run Script, which is making the change. selfmade69 1 Link to comment
selfmade69 Posted June 18, 2023 Author Share Posted June 18, 2023 (edited) On 6/17/2023 at 3:56 PM, vitor said: You don’t have to do that. The Script Filter isn’t running code to change the Night Shift value, it’s only there to present an interface for you to insert a value. That value is then passed to the Run Script, which is making the change. Welp! It boggles my mind how come this tiny part of code could tell night mode to send the command successfully: ./nshift "25" Edited June 18, 2023 by selfmade69 Link to comment
vitor Posted June 18, 2023 Share Posted June 18, 2023 That is not doing the change, it’s calling a command (inside the workflow’s folder) which does the heavy lifting. 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