Using the IF> and 'and' command together?

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Mark Gevry
Pro Scripter
Posts: 63
Joined: Sat Dec 25, 2004 3:23 pm

Using the IF> and 'and' command together?

Post by Mark Gevry » Sat Dec 25, 2004 3:50 pm

Hi. Is this possible? Heres what my script is doing...It's playing an online game. And it searches for 1 card, and looks at 7 other different spots for a match. Your looking to ADD 13's. So if it sees a 3 it looks in the other 7 spots for a 10. Now if it doesnt find a match, it goes and looks for other cards. Heres wat i have to show you....

label>colors
GetpixelColor>208,192,3-1
GetpixelColor>322,187,10-2
GetpixelColor>202,261,10-3
GetpixelColor>321,259,10-4
getPixelColor>197,331,10-5
GetpixelColor>322,331,10-6
GetpixelColor>201,405,10-7
GetpixelColor>320,405,10-8
if>%3-1%=2265380,3to10
goto>colors
label>3to10
if>%10-2%=5896287,c3-10-2
if>%10-3%=5896287,c3-10-3
if>%10-4%=5896287,c3-10-4
if>%10-5%=5896287,c3-10-5
if>%10-6%=5896287,c3-10-6
if>%10-7%=5896287,c3-10-7
if>%10-8%=5896287,c3-10-8
goto>colors
-------------------------------------------------------
Now in that last 8 lines (all the if's)....can i do this...
if>%10-2% and %10-3% and %10-4% and %10-5% and %10-6% and
%10-7% and %10-8%5896287 then lookforsomethingelse

If it doesnt find the 3's and tens i want to know how to put that in the script....is what i did correct? Thnx

-Mark

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

Post by support » Sat Dec 25, 2004 9:54 pm

if>%10-2% and %10-3% and %10-4% and %10-5% and %10-6% and %10-7% and %10-8%5896287 then lookforsomethingelse
Yes, use complex expressions:

If>{(%10-2%5896287) and (%10-3%5896287) and (...etc...)}
lookforsomethingelse
EndIf
MJT Net Support
[email protected]

Mark Gevry
Pro Scripter
Posts: 63
Joined: Sat Dec 25, 2004 3:23 pm

Post by Mark Gevry » Sun Dec 26, 2004 2:21 am

Ty mjtnet. I should have known that since i did it in Visual Basic before. Thnx for the quick reply.

-Mark

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