Jump to content

Problem generating feedback from file action

Recommended Posts

I have a workflow that uses a file action, that passes the file to a "Run Script" action. The run script generates XML output for feedback to show in Alfred:


<?xml version="1.0"?><items><item uid="metadata-completename" arg="/Users/jack/Downloaded Media/shiveringhope07.jpeg" type="file" valid="yes"><title>Complete name</title><subtitle>/Users/jack/Downloaded Media/shiveringhope07.jpeg</subtitle></item><item uid="metadata-format" arg="JPEG" type="file" valid="yes"><title>Format</title><subtitle>JPEG</subtitle></item><item uid="metadata-filesize" arg="33.1 KiB" type="file" valid="yes"><title>File size</title><subtitle>33.1 KiB</subtitle></item><item uid="metadata-width" arg="650 pixels" type="file" valid="yes"><title>Width</title><subtitle>650 pixels</subtitle></item><item uid="metadata-height" arg="300 pixels" type="file" valid="yes"><title>Height</title><subtitle>300 pixels</subtitle></item></items>

However, this feedback never shows.

Edited by Jack James
Link to comment

So is there a way to generate feedback based on a file in Alfred?


As Florian mentioned, you can only generate and pass back results using a script filter module. If you need to string several of those together, you would have to make another script filter, and make the final step of the previous run an applescript to "search" the keyword of the next step. OR you could erased the content of the current workflow, and save the previous value in a file to save context and continue

Link to comment

Brilliant, that's a possibility I hadn't considered! Lo and behold, it works!


Another option you could try but, requires a little more work to do it this way is to use autocompletes. Using autocompletes, you could have it wipe the value of the input field (after saving that data to a file or something to save context), then letting them continue on. So basically, the single keyword would allow you to perform several steps depending on what the context is. I need to make and post a sample workflow doing this so I can provide a good example to people. It's kind of hard to follow just describing it.

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...