Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
number recognition macro
#1
hello, is there a way to make a number recognition macro on small part of the screen? like this preset macro only search for any number between 20-60 and auto stop the macro if found. please help if you know how

#This is the script source file created by Quick Macro
#You can modify this file on the condition that you understand the various commands
#The modification result will be reflected in common view

VBSCall FindColorEx(0,0,1024,768,"FFFFFF",1,0.8,x,y)
//Search a fuzzy color in a fixed area (0,0,1024,768) is the area, "FFFFFF" is the color, 1 means searching from center to periphery, 0.8 means the fuzzy degree. The found coordinates will be saved in (x,y)
If x>=0 and y>=0
//If found the fuzzy color, x and y will be larger than 0
MoveTo x y
//Move mouse cursor to the color. For some games, you may use the coordinates with offsets like 'MoveTo x+10 y+10'
Delay 50
LeftClick 1
//Click left mouse button to attack
EndIf
#2
This forum is not of Quick Macro.
#3
oh, what about quick macros? can you guys do that?
#4
Can find image or color. Can find numbers/text if it is an UI object of some type, for example an accessible object.
#5
i found this in other post
RECT r; r.left=100; r.top=100; r.right=300; r.bottom=300
rep
,if(!scan("test.bmp" 0 r))
,,break ;;exit loop when not found
,;found
,out "x=%i y=%i width=%i height=%i" r.left r.top r.right-r.left r.bottom-r.top
,;...
,0.5 ;;wait

do you think it will work? all i need it to do is find a number between 2-6 in a small section of the screen. let say if i just use the pic of those number and make the macro keep searching that image of number it till found.
#6
Yes, similar code can be used. It is not optimized to search for multiple images, but in small area should not use much CPU.
Also try accessible objects, maybe will work. Will not work if you cannot capture the numbers with the 'Find accessible object' dialog.


Forum Jump:


Users browsing this thread: 1 Guest(s)