lycopodiopsida Posted July 28, 2017 Share Posted July 28, 2017 Hi guys and girls, I have a couple of questions related to workflows. I want to do a workflow which should be able to distinguish between types of selected objects - text, folders and files. Based on type it should perform different actions. How does a argv object internally looks like? Does it even provide a mime-type information or converts everything to text? How can I properly debug workflows? With built-in debug I get only the output in the console. Is it possible to have a look into the argv object structure or set breakpoints in scripts? Link to comment
deanishe Posted July 28, 2017 Share Posted July 28, 2017 I'm not sure what you mean by "arg v object". If you mean the input to a Run Script, ARGV works exactly the same as with any other command-line program. Text is passed as $1 and multiple files are passed as $1, $2 etc. Workflows are not plugins and do not have access to any of Alfred's internal objects. They are external processes. If you want to set breakpoints, you'll have to use a debugger appropriate to the language you're using. 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