Jump to content

Get type of files or data and debugger


Recommended Posts

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. 

 

  1. How does a argv object internally looks like? Does it even provide a mime-type information or converts everything to text?
  2. 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

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

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

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...