IF>Var containes text

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
HolyAbsolut
Newbie
Posts: 17
Joined: Wed Sep 21, 2011 10:28 am

IF>Var containes text

Post by HolyAbsolut » Fri Nov 11, 2011 8:49 am

Hi @ all,

I already has searched in this forum but I didn´t find the right topic.

Actual I have following problem.
I´m reading in a text from the Internet Explorers site. This works quite good.

Now I want to check if this readed text containes another variable.
If this match the script can continue.

Below an example

"g 0075502536 000000000090030297 HINTERACHSE PRIVATE LTD. 02.11.2011 08:08:00"=Var1

IF>Var1[contains]Var2
Label>Continue
Endif

Is there such an option?Thanks for your help.

Using Windows XP
Macro Schedular 12.1.10

Best regards

HolyAbsolut

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Nov 11, 2011 9:02 am

Use the Pos command which returns the position of one string in another.

Example with hard-coded data:

Code: Select all

Let>var1=g 0075502536 000000000090030297 HINTERACHSE PRIVATE LTD. 02.11.2011 08:08:00
Let>var2=HINTERACHSE
Pos>var2,var1,1,intPos
If>intPos>0
  //var2 is inside var1
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts