Need help with simple expression please.

Post your questions and help other users.

Moderator: Martin

Post Reply
dragon
Posts: 29
Joined: 10 Sep 2015 08:13

Need help with simple expression please.

Post by dragon » 20 Jun 2016 03:44

All I want to know right now is this...

I'm doing a UI query with Autoinput plugin. The query gives me this... [Navigate up, Flow1, ON, More options]
therefore %aitext() = [Navigate up, Flow1, ON, More options] or written in Automagic aitext == "[Navigate up, Flow1, ON, More options]"

How to I make the expression true if any of the queried text result includes just one word I am looking for? I want the expression to be true specifically because the word "Navigate" is found.

I do UI queries and look for keywords, mostly a couple or a few keywords ie: "Navigate" and "Flow1" from the above. This way if the keywords are :?: shown on sceen ie: Chrome window, an action is performed.

Please

dragon
Posts: 29
Joined: 10 Sep 2015 08:13

Re: Need help with simple expression please.

Post by dragon » 20 Jun 2016 06:16

Okay, I figured out the main part...

contains(aitext, "Navigate") works...

but how about if I want to query 2 words not next to eachother?

Please

User avatar
Bushmills
Posts: 286
Joined: 23 Sep 2014 21:56

Re: Need help with simple expression please.

Post by Bushmills » 20 Jun 2016 08:42

matches(aitext,".*first.*second.*");

You could also consult viewtopic.php?f=5&t=4203&p=11321 as I believe your questions have been answered there already before.

dragon
Posts: 29
Joined: 10 Sep 2015 08:13

Re: Need help with simple expression please.

Post by dragon » 20 Jun 2016 11:05

Bushmills wrote:matches(aitext,".*first.*second.*");

You could also consult viewtopic.php?f=5&t=4203&p=11321 as I believe your questions have been answered there already before.
yes thank you, I know I was rereading that post aswell, I just find it very difficult to understand. The was you explained it makes more sense to me, thanks again.

Post Reply