Jump to content

Web searches: how to query multiple queries at one.


Recommended Posts

(As I am not sure if it is already possible, I post this thread here and not in Alfred features suggestions).

 

I was thinking about web searches found cool how easy it is to create them. One url + {query}. Done.

 

I was wondering if it was possible to perform multiple queries at once. For example typing the following in Alfred's bar:

 

one web searches keyword + {query1}+{query2}+{query3}.

 

with the alexa.com web search I sat it would give :

 

sale keyboardmaestro.com,alfredapp.com,google.com

 

It would open 3 tabs with the result of each query. 

 

Maybe there are other way to do it.

 

I am just trying to find a way not to have to perform the same task three times.

Link to comment
2 hours ago, politicus said:

sale keyboardmaestro.com,alfredapp.com,google.com

 

That's not practically possible with a built-in websearch, no: That would make it impossible to search for anything with a comma in it.

 

It can be done easily enough with a workflow, however. You just need to split your input on whichever delimiter you've chosen (comma in your case), add it to the URL, then open it.

Link to comment

Yes, I did I even tried the workflows.  

 

The output will then contain the list of variables you've just created

I do not know how to work with the variables I get from the split action.

 

Here is what I get from the debug :

 

[20:32:39.148] Multiple queries at once[Keyword] Processing complete

[20:32:39.149] Multiple queries at once[Keyword] Passing output 'google,yahoo,bing' to Split Arg to Vars

[20:32:39.149] Multiple queries at once[Split Arg to Vars] Processing complete

[20:32:39.150] Multiple queries at once[Split Arg to Vars] Passing output 'google,yahoo,bing' to Debug

[20:32:39.151] Multiple queries at once[Debug] 'google,yahoo,bing', {

  var1 = "google"

  var2 = "yahoo"

  var3 = "bing"

}

[20:32:39.151] Multiple queries at once[Debug] Processing complete

[20:32:39.152] Multiple queries at once[Debug] Passing output 'google,yahoo,bing' to Open URL

 

Edited by politicus
Link to comment

Well, the no-code way would be to add a bunch of Filters with “if var1 is not empty”, “if var2 is not empty” etc. And connect each one to an Open URL action that uses {var:var1}, {var:var2} etc. instead of {query}.

 

That’s clunky, though, and it would be better to write a few lines of code to grab all the variables and stick them in URLs.

 

If you’d prefer that, I can help you with the code.

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