GuiB Posted July 4, 2021 Share Posted July 4, 2021 Alfred workflow objects can work on array. For example, selecting multiple files in Finder and calling a "HotKey" trigger with a multi-selection will pass the files to an "Action in Alfred" workflow object and this latest object will interpret the passed query as multiple files (like an array). However, when this query is manipulated and then moved back in Alfred domain from an object that only allows a single string return type (like the return of a "Arg and Vars" object or when we set the query into an environment variable) then this multi-argument query is converted to a single argument query with the items concatenated to a single string delimited with tab. Which is fine since this is a restriction from those methods, but then the problem is that we can't make use of the Alfred workflow objects that can interpret those multi-arguments query since it is now passed as a single argument. We can work around this by using a "Run Script" and splitting the string into an array and then call from the script the wanted Alfred action using AppleScript or JSX, but we can't move back to chain into another Alfred workflow object or we need to do the same procedure with another "Run Script" and call from inside. Therefore, it would be great if a new Workflow object could be created or the "Split Arg to Vars" could be modified to allow to output and pass a multi-arguments query to a chained object. For example, this would make it possible to pass an array of strings to be used by the new Text action with the "Action in Alfred" object and make workflows specific to array of strings. Also, this could make it easier for people to receive a value from an "External Trigger" and split it and use the standard Alfred workflow objects. Jasondm007 1 Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now