bad loop

Creating macros. Working with QM.

bad loop

Postby ilya1111 on Fri Nov 17, 2017 4:42 pm

hello!
Qm find only first picture and out after for example like this:
find
7
find
7
find
7
find
7
...
find
7
but on screen other numbers
Code: Select all
1
int w=win("" "TFrmDesktop")
int Jh = wait(555 C 0x090909 313 308 w 1|0x1000);err

int w1=win("" "TFrmDesktop")
int Jh1 = wait(555 C 0x393939 332 64 w1 1|0x1000);err

int w2=win("" "TFrmDesktop")
int Jh2 = wait(555 C 0x5253A9 336 66 w2 1|0x1000);err

out "find"

0.5

int w21=win("" "TFrmDesktop")
RECT r21; r21.left=259; r21.top=90; r21.right=377; r21.bottom=364
int Ah1 = wait(0.01 S "image:h00AD978E" w21 r21 16|0x190 8);err
if Ah1=1
   out "1"
   goto 1

int w14=win("" "TFrmDesktop")
RECT r14; r14.left=259; r14.top=90; r14.right=377; r14.bottom=364
int Ah2 = wait(0.01 S "image:h7CA44AD2" w14 r14 16|0x190 8);err
if Ah2=1
   out "2"   
   goto 1
int w26=win("" "TFrmDesktop")
RECT r26; r26.left=259; r26.top=90; r26.right=377; r26.bottom=364
int Ah3 = wait(0.01 S "image:h771FC9C4" w26 r26 16|0x190 8);err
if Ah3=1
   out "3"
   goto 1
int w23=win("" "TFrmDesktop")
RECT r23; r23.left=259; r23.top=90; r23.right=377; r23.bottom=364
int Ah4 = wait(0.01 S "image:hA811C7A9" w23 r23 16|0x190 8);err
if Ah4=1
   out "4"
   goto 1
int w20=win("" "TFrmDesktop")
RECT r20; r20.left=259; r20.top=90; r20.right=377; r20.bottom=364
int Ah5 = wait(0.01 S "image:h3857EC96" w20 r20 16|0x190 8);err
if Ah5=1
   out "5"
   goto 1
int w25=win("" "TFrmDesktop")
RECT r25; r25.left=259; r25.top=90; r25.right=377; r25.bottom=364
int Ah6 = wait(0.01 S "image:h32FC5E23" w25 r25 16|0x190 8);err
if Ah6=1
   out "6"
   goto 1
int w13=win("" "TFrmDesktop")
RECT r13; r13.left=259; r13.top=90; r13.right=377; r13.bottom=364
int Ah7 = wait(0.01 S "image:h0211D5B5" w13 r13 16|0x190 8);err
if Ah7=1
   out "7"
   goto 1
int w24=win("" "TFrmDesktop")
RECT r24; r24.left=259; r24.top=90; r24.right=377; r24.bottom=364
int Ah8 = wait(0.01 S "image:hA0309F37" w24 r24 16|0x190 8);err
if Ah8=1
   out "8"
   goto 1
int w19=win("" "TFrmDesktop")
RECT r19; r19.left=259; r19.top=90; r19.right=377; r19.bottom=364
int Ah9 = wait(0.01 S "image:h8C170FC2" w19 r19 16|0x190 8);err
if Ah9=1
   out "9"
   goto 1
int w18=win("" "TFrmDesktop")
RECT r18; r18.left=259; r18.top=90; r18.right=377; r18.bottom=364
int Ah10 = wait(0.01 S "image:h00A0DA79" w18 r18 16|0x190 8);err
if Ah10=1
   out "10"
   goto 1

Warning: The code possibly is invalid because some important characters (tabs, spaces) disappeared. Read more.
does anyone see an error?
sory code copy from notepad
ilya1111
 
Posts: 27
Joined: Wed Feb 15, 2017 1:39 pm

Re: bad loop

Postby ilya1111 on Mon Nov 20, 2017 7:44 pm

The problem is that when I do a loop, I use the variable that remember it and out the first ones that were already at the end of the last. but I need only last :? :?
ilya1111
 
Posts: 27
Joined: Wed Feb 15, 2017 1:39 pm


Return to General

Who is online

Users browsing this forum: No registered users and 3 guests