GetRectCheckSum problems

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

GetRectCheckSum problems

Post by Mark Gevry » Thu Jan 06, 2005 9:39 pm

Hi. I just did about 25 getRectCheckSum> 's and added the if>'s and there commands. And its not finding what its searching for...take a look...
label>card_play
GetRectCheckSum>319,264,327,271,red2_slot1
GetRectCheckSum>319,264,327,271,black2_slot1
GetRectCheckSum>319,264,327,271,red3_slot1
GetRectCheckSum>319,264,327,271,black3_slot1
GetRectCheckSum>319,264,327,271,red4_slot1
GetRectCheckSum>319,264,327,271,black4_slot1
GetRectCheckSum>319,264,327,271,red5_slot1
GetRectCheckSum>319,264,327,271,black5_slot1
GetRectCheckSum>319,264,327,271,red6_slot1
GetRectCheckSum>319,264,327,271,black6_slot1
GetRectCheckSum>319,264,327,271,red7_slot1
GetRectCheckSum>319,264,327,271,black7_slot1
GetRectCheckSum>319,264,327,271,red8_slot1
GetRectCheckSum>319,264,327,271,black8_slot1
GetRectCheckSum>319,264,327,271,red9_slot1
GetRectCheckSum>319,264,327,271,black9_slot1
GetRectCheckSum>319,264,327,271,red10_slot1
GetRectCheckSum>319,264,327,271,black10_slot1
GetRectCheckSum>319,264,327,271,redjack_slot1
GetRectCheckSum>319,264,327,271,blackjack_slot1
GetRectCheckSum>319,264,327,271,redqueen_slot1
GetRectCheckSum>319,264,327,271,blackqueen_slot1
GetRectCheckSum>319,264,327,271,redking_slot1
GetRectCheckSum>319,264,327,271,blackking_slot1
GetRectCheckSum>319,264,327,271,redace_slot1
GetRectCheckSum>319,264,327,271,blackace_slot1
GetRectCheckSum>319,264,327,271,silverjack_slot1
if>%red2_slot1%=20196775,r2_check_slot_2
if>black2_slot1%=20196411,b2_check_slot_2
If>%red3%=16468934,r3_check_slot_2
If>%black3%=16468514,b3_check_slot_2
if>%red4%=12673986,r4_check_slot_2
if>%black4%=12673508,b4_check_slot_2
if>%red5%=14975785,r5_check_slot_2
if>%black5%=14975342,b5_check_slot_2
if>%red6%=18217093,r6_check_slot_2
if>%black6%=18216700,b6_check_slot_2
if>%red7%=27196122,r7_check_slot_2
if>%black7%=27195866,b7_check_slot_2
if>%red8%=16978954,r8_check_slot_2
if>%black8%=16978542,b8_check_slot_2
if>%red9%=15442184,r9_check_slot_2
if>%black9%=15441749,b9_check_slot_2
if>%red10%=14932165,r10_check_slot_2
if>%black10%=14931721,b10_check_slot_2
if>%redjack%=20582645,rjack_check_slot_2
if>%blackjack%=20582287,bjack_check_slot_2
if>%redqueen%=12244496,rqueen_check_slot_2
if>%blackqueen%=15441749,bqueen_check_slot_2
if>%redking%=20794034,rking_check_slot_2
If>%blackking%=20793680,bking_check_slot_2
if>%redace%=12861888,race_check_slot_2
if>%blackace%=12861413,bace_check_slot_2
if>%silverjack%=43987002,silverj_check_slot_2
goto>card_play
label>r2_check_slot_2
message>Red 2
goto>card_play
label>b2_check_slot_2
message>Black 2
goto>card_play
label>r3_check_slot_2
message>Red 3
goto>card_play
label>b3_check_slot_2
message>Black 3
goto>card_play
label>r4_check_slot_2
message>Red 4
goto>card_play
label>b4_check_slot_2
message>Black 4
goto>card_play
label>r5_check_slot_2
message>Red 5
goto>card_play
label>b5_check_slot_2
message>Black 5
goto>card_play
label>r6_check_slot_2
message>Red 6
goto>card_play
label>b6_check_slot_2
message>Black 6
goto>card_play
label>r7_check_slot_2
message>Red 7
goto>card_play
label>b7_check_slot_2
message>Black 7
goto>card_play
label>r8_check_slot_2
message>Red 8
goto>card_play
label>b8_check_slot_2
message>Black8
goto>card_play
label>r9_check_slot_2
message>Red 9
goto>card_play
label>b9_check_slot_2
message>Black 9
goto>card_play
label>r10_check_slot_2
message>Red 10
goto>card_play
label>b10_check_slot_2
message>Black 10
goto>card_play
label>rjack_check_slot_2
message>Red Jack
goto>card_play
label>bjack_check_slot_2
message>Black jack
goto>card_play
label>rqueen_check_slot_2
message>Red Queen
goto>card_play
label>bqueen_check_slot_2
message>Black Queen
goto>card_play
label>rking_check_slot_2
message>Red King
goto>card_play
label>bking_check_slot_2
message>Black King
goto>card_play
label>race_check_slot_2
message>Red Ace
goto>card_play
label>bace_check_slot_2
message>Black Ace
goto>card_play

nothing is working now. Its trying to red cards, and its not finding them.

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

Post by support » Thu Jan 06, 2005 10:08 pm

In your script whatever label is jumped to all subsequent labels will also be processed. Is this intentional?
MJT Net Support
[email protected]

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

Post by Mark Gevry » Thu Jan 06, 2005 10:21 pm

What do you mean? I just want it to work like getPixelColor>...search spot-find it-do the command....What are you saying tho?

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

Post by support » Thu Jan 06, 2005 10:33 pm

Sorry, I am wrong. Just looked again at your script and I see you jump to card_play after each label section, so it does just perform the one label.
MJT Net Support
[email protected]

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

Post by Mark Gevry » Thu Jan 06, 2005 10:47 pm

yeah well the script isnt working. Whats the deal?

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

Post by Mark Gevry » Fri Jan 07, 2005 2:34 am

anyone?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri Jan 07, 2005 2:37 am

Do you see anything wrong if you single step through the macro with "Show Watchlist" turned on?

Look at the log file for the script and see what is actually happening?
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Jan 07, 2005 4:49 am

1. What do you mean by "nothing is working now"?
2. Please try logging. To find out more about Logging, go to online help.
In particular, I'm interested in knowing what values you got from red2_slot1, black2_slot1,.....etc.
3. In addition, I wonder why all coordinates (x and y) are the same, that is, 319,264,327,271,.

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

Post by Mark Gevry » Fri Jan 07, 2005 11:53 am

they are the same because those are the coords around the card numbers. The cards show up in the same spot everytime.

Me_again

Post by Me_again » Fri Jan 07, 2005 5:51 pm

What arrmsys is telling you is that all those GetRectCheckSum>'s are going to put the same value into all your variables. In other words it's getting the sum from 319,264,327,271 and putting it into red2_slot1, then it's getting exactly the same sum and putting it into black2_slot1.

Maybe you really want to do the GetRectCheckSum> one time into one variable, and then do all your if's using that variable to determine which card it is?

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

Post by Mark Gevry » Fri Jan 07, 2005 7:47 pm

Can you show an example please

Guest

Post by Guest » Fri Jan 07, 2005 9:09 pm

something like this


label>card_play
GetRectCheckSum>319,264,327,271,card_data
if>card_data=20196775,r2_check_slot_2
if>card_data=20196411,b2_check_slot_2
If>card_data=16468934,r3_check_slot_2
If>card_data=16468514,b3_check_slot_2
etc
goto>card_play
label>r2_check_slot_2
message>Red 2
goto>card_play
label>b2_check_slot_2
message>Black 2
goto>card_play
label>r3_check_slot_2
message>Red 3
goto>card_play
label>b3_check_slot_2
message>Black 3
goto>card_play
label>r4_check_slot_2
message>Red 4
goto>card_play
label>b4_check_slot_2
message>Black 4
goto>card_play
label>r5_check_slot_2
message>Red 5
goto>card_play
label>b5_check_slot_2
message>Black 5
goto>card_play
label>r6_check_slot_2
message>Red 6
goto>card_play
label>b6_check_slot_2
message>Black 6
goto>card_play
label>r7_check_slot_2
message>Red 7
goto>card_play
label>b7_check_slot_2
message>Black 7
goto>card_play
label>r8_check_slot_2
message>Red 8
goto>card_play
label>b8_check_slot_2
message>Black8
goto>card_play
label>r9_check_slot_2
message>Red 9
goto>card_play
label>b9_check_slot_2
message>Black 9
goto>card_play
label>r10_check_slot_2
message>Red 10
goto>card_play
label>b10_check_slot_2
message>Black 10
goto>card_play
label>rjack_check_slot_2
message>Red Jack
goto>card_play
label>bjack_check_slot_2
message>Black jack
goto>card_play
label>rqueen_check_slot_2
message>Red Queen
goto>card_play
label>bqueen_check_slot_2
message>Black Queen
goto>card_play
label>rking_check_slot_2
message>Red King
goto>card_play
label>bking_check_slot_2
message>Black King
goto>card_play
label>race_check_slot_2
message>Red Ace
goto>card_play
label>bace_check_slot_2
message>Black Ace
goto>card_play

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Fri Jan 07, 2005 11:46 pm

Hi Me_Again Guest,

Thanks a lot. Your exlanation is absolutely correct. If reading the same area in such a short time (within .01 seconds) , of course, the same Checksum will be produced. As such, those subsequent If> comparisions won't be meaningful.

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Sat Jan 08, 2005 12:21 am

...and if it's not a static image then it's a complete crap shoot what values get captured to what variable.

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

Post by Mark Gevry » Sat Jan 08, 2005 1:41 am

it works now...tyvm

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