Jump to content

Send the content of the input line from ScriptFilter to the next step as {input}


xtin

Recommended Posts

Many scripts that rely on external sources like web services or databases need some considerable time to evaluate.  As Alfred will always send the content of the currently selected Item if you press enter, it can only submit what has been entered up to the last successful evaluation of the script. Now for scripts where you input text, e.g. a chat message, where upon pressing enter you want to do something with that message, even if processing it has not finished yet, it would be super useful if you can access the content of the input line from the ScriptFilter in the Script, maybe as {input}. 

 

(My current usecase is implementing skyping via Alfred, I display the last messages between the user and the currently selected friend as items, it really does not matter which one is selected to submit the message, however it is super important that the complete input string is sent to the script so it can be sent to skype, as otherwise parts of the messages will be missing. Unfortunately the SQLite query to fetch said data takes a while (maybe 50 to 100ms), enough to consistently eat my smilies or at least their mouths, which is a horrible thing to do to smilies ;) I think this should be relatively simple to implement and provide a huge benefit to Alfred, namely be able to chat with it fluently. (Or write E-Mails, or...) )

 

(This a result of this thread: http://www.alfredforum.com/topic/1416-incomplete-query/)

Edited by xtin
Link to comment
Share on other sites

  • 3 months later...

+1 on this.

 

This would be very useful for Script Filter workflows that take additional parameters after the autocomplete options are shown. For example, I'm building a workflow to add items to a list. The usage is as follows

 

list [filename] [some arbitrary text to add to the list]

 

I want the list to be able to autocomplete filenames for files in a pre-set directory, so it is necessary to use a script filter. However, after adding the file to the parameters (for example "list Groceries.txt"), I no longer need the benefits of the script filter and just want the query to be parsed when I press enter. Currently if you hit enter before the script filter has had a chance to finish processing the query, it will truncate the end of the text.

Link to comment
Share on other sites

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