Using If with wildcards

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
Chaoticz
Newbie
Posts: 15
Joined: Wed Apr 23, 2003 3:47 pm
Location: Atlanta, GA USA

Using If with wildcards

Post by Chaoticz » Mon May 19, 2003 4:56 pm

Im trying to match some text from inside a window but it never seems to match.

GetWindowText>window_name,output_text
If>output_text=*Confirm bill*,label1

Basically, the statement above is never true; Yet the output_text variable contains "Confirm bill" in the middle of the string. What is the best way to go about this.

This is the actual value of %output_text% (from MessageModal):
OK
Cancel
Confirm bill processing for the 10 selected visits?

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Mon May 19, 2003 6:07 pm

Hi,

Like this:

GetWindowText>window_name,output_text
Position>Confirm bill,window_name,1,p
If>p>0,label1

i.e. if starting position of substring 'Confirm bill' within string window_name is greater than zero (zero would mean it doesn't exist in the string at all) then go to label 1, else continue.
MJT Net Support
[email protected]

Chaoticz
Newbie
Posts: 15
Joined: Wed Apr 23, 2003 3:47 pm
Location: Atlanta, GA USA

thanks

Post by Chaoticz » Mon May 19, 2003 8:53 pm

Thanks, this is exactly what I need.

I think you meant the second parameter of Position to be output_text.

GetWindowText>window_name,output_text
Position>Confirm bill,output_text,1,p
If>p>0,label1

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