Code: Select all
Let>NumFound=0
repeat>NumFound
Wait>1.0
//Find and Do Nothing Center of
FindImagePos>%BMP_DIR%\image_3.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
Press Page Down
Until>NumFound=5
Moderators: Dorian (MJT support), JRL
Code: Select all
Let>NumFound=0
repeat>NumFound
Wait>1.0
//Find and Do Nothing Center of
FindImagePos>%BMP_DIR%\image_3.bmp,SCREEN,0.7,1,XArr,YArr,NumFound,CCOEFF
Press Page Down
Until>NumFound=5
Code: Select all
Let>FilePath=c:\Users\xb360\Documents\Macrofiles\xpdfbin-win-4.04\bin64
RunProgram>%FilePath%\pdftotext -table -layout "d:\my.pdf"
Code: Select all
Let>k=0
Label>start
Let>k=k+1
Wait>1.0
OCRArea>887,179,943,199,strText
Wait>1.0
Press Page down
If>k<10
Goto>start
Endif
MessageModal>strText
Each time your loop runs, the last value of strtext will be replaced with the new value.Rick0825 wrote: ↑Mon May 08, 2023 7:20 pmIts currently returning the text area of the last page only.
Code: Select all
Let>k=0 Label>start Let>k=k+1 Wait>1.0 OCRArea>887,179,943,199,strText Wait>1.0 Press Page down If>k<10 Goto>start Endif MessageModal>strText
Code: Select all
OCRArea>887,179,943,199,strText
Code: Select all
OCRArea>887,179,943,199,strText_%k%
Code: Select all
//Simulate "extracting data" in a loop, creating an array as it goes. 10 cycles
Let>inloop=0
repeat>inloop
Let>inloop=inloop+1
//Creates an array of pseudo data, 100,200,300, and so on.
Let>strText_%inloop%={(%inloop%*100)}
Until>inloop,10
//How many items are in the array?
ArrayCount>strText,items
mdl>This array contains %items% items. We will loop that many times.
//"Do something with the data", looping %items% number of times
Let>outloop=0
repeat>outloop
let>outloop=outloop+1
mdl>strText_%outloop%
Until>outloop,items
Here's a list of resources, in no particular order.
Code: Select all
Let>k=0
Repeat>k
Let>k=k+1
Wait>1.0
OCRArea>887,179,943,199,strText_%k%
Wait>1.0
Press Page down
Let>strText_%k%={(%k%*1)}
Until>k,7
MDL>strText_%k%
Code: Select all
Let>k=0
Repeat>k
Let>k=k+1
Wait>1.0
OCRArea>887,179,943,199,strText
Wait>1.0
Press Page down
//Let>strText_%k%={(%k%*1)}
MDL>strText
Until>k,7
Code: Select all
Let>k=0
Repeat>k
Let>k=k+1
Wait>1.0
OCRArea>887,179,943,199,strText_%k%
Wait>1.0
Press Page down
//Let>strText_%k%={(%k%*1)}
Until>k,7
//How many items are in the array?
ArrayCount>strText,items
mdl>This array contains %items% items. We will loop that many times.
//"Do something with the data", looping %items% number of times
Let>outloop=0
repeat>outloop
let>outloop=outloop+1
mdl>strText_%outloop%
Until>outloop,items