Jump to content

Multiple argument for search on web


Recommended Posts

Hi all, so I want to make custom search for multiple argument and I need help.

I use Alfred v3 with powerpack, doesn't have many experience with programming.

 

The argument is for example:

  • search keyword
  • minimum price
  • condition (used or new)

So when I type keyword and the argument separated by comma it will search to several website that I have registered.

 

Example:

User input aaa, bbb, ccc

 

Will search:

  1. website1.com/xxx=aaa&yyy=bbb&zzz=ccc
  2. website2.com/xxx=bbb&yyy=aaa&zzz=ccc
  3. website1.com/xxx=ccc&yyy=bbb&zzz=aaa
  4. so on

(the structure for each website is different)

 

condition:

  • If input only aaa, not bbb or ccc, dismiss argument for bbb & ccc
  • If input olly for aaa & bbb, dismiss ccc.
  • The condition (new/used) is different for each website, so need to change from the given keyword to wach website format.

 

Hope it is clear enough. What is the best way to do it?

Any help would be appreciated.

Link to comment

@t3k There are a few ways to do this, with the best one being to use workflow variables to allow the user to enter these arguments one at the time.

 

Here's a guide to using variables in workflows:

https://www.alfredapp.com/help/workflows/advanced/variables/

 

You can then add the built-in Simple To-Do List workflow example to see the above example in action. :)

 

Alternatively, if you'd rather take one query and split it yourself, this thread covers that:

http://www.alfredforum.com/topic/6055-mutli-parameter-web-search/?do=findComment&comment=37205

 

Cheers,
Vero

 

Link to comment
  • 1 year later...
On 11/4/2016 at 7:25 PM, Vero said:

@t3k There are a few ways to do this, with the best one being to use workflow variables to allow the user to enter these arguments one at the time.

 

Here's a guide to using variables in workflows:

https://www.alfredapp.com/help/workflows/advanced/variables/

 

You can then add the built-in Simple To-Do List workflow example to see the above example in action. :)

 

Alternatively, if you'd rather take one query and split it yourself, this thread covers that:

http://www.alfredforum.com/topic/6055-mutli-parameter-web-search/?do=findComment&comment=37205

 

Cheers,
Vero

 

 

Hi vero thanks for the answer and sory for late replies.

I've understand a little about using query splitting playing with andrew's kitten image example.

Can you explain it more about using the workflows to input the argument one at the time?

Link to comment

@t3k Take a look at the built-in workflow in Alfred, under the + button in the bottom left > Examples > Simple To-Do List.

 

In this example, I'm using two variables; The first is typed (the task I want to do) and the second is picked from a List Filter (the list to which I want to add it), each of which is saved in an Arg & Vars utility, then called later in the "Append to file" object to form the name of the list to which I want to add the task.

 

If you need further help, your best bet is to have a play with workflows, then post your own work in progress workflow if you have questions on how to complete it. :)

 

Cheers,
Vero

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