Jump to content

Is there a way to get the keyword (and not just the arguments)?

Recommended Posts



I can not find a way to access the actual keyword entered if a workflow is triggered by a keyword input. I can only get the arguments via {query}.


Getting the argument would allow to handle multiple keyword commands in a single script.


For a simple example, suppose I want to process and then add items to either a "work" and "home" folder. Currently, unless I want to duplicate my script, I can use a single keywork "add" and the must specify the destination as the first argument, for example:


 "add h item1 item2" (to add items to "home" folder)

 "add w item1 item2! (to add items to "work" folder)


But if it was possible to access the keyword from a query I could use


 "addh item1 item2" (to add items to "home" folder)

 "addw item1 item2! (to add items to "work" folder)


Any throught or ideas?




Link to comment
Just make two of them. Different keywords, different outcomes, sounds like a separate script to me.

Sure, that would be possible, but it would mean to duplicate code: in the example above, suppose you want to do a some processing on the items, regradless of the destination being "home" or "work".

Link to comment

Setting no space shouldn't do it, it is still going to match the keyword and only pass whatever comes after the keyword. I don't believe there is going to be a way to grab the keyword.


By 'do some processing on them' what are you meaning? Because technically you could still do as Florian suggested and create multiple keywords for entering, but then link each keyword to a single action, or to a single action based on a specific modifier key.

Link to comment

It would be great to be able to grab the keyword as well as the query.


Would allow me to integrate with my bug tracker in the following way: Entering "bugticket-123" would just open my bug ticket, but I need the bugticket bit (my keyword) as well as the -123. There would by multiple keywords to trigger this.

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