zora
New Member
Posts: 22
|
Post by zora on Feb 11, 2018 2:46:52 GMT
power0.png should be auto captured by script right? local p = numberOCR(r,"power")
|
|
|
Post by AnkuLua on Feb 11, 2018 9:05:17 GMT
No. You have to capture those pictures manually.
|
|
zora
New Member
Posts: 22
|
Post by zora on Feb 11, 2018 14:25:53 GMT
sorry i don't how it works honestly number is changing and this function local p = numberOCR(r,"power") i thought return number from current power please can you help in reading number in region? i just want to read number in power region
|
|
zora
New Member
Posts: 22
|
Post by zora on Feb 13, 2018 15:28:09 GMT
any idea?
|
|
|
Post by AnkuLua on Feb 14, 2018 5:55:13 GMT
|
|
zora
New Member
Posts: 22
|
Post by zora on Feb 14, 2018 15:54:20 GMT
thanks for info, I did make 10 images number pattern and it works, but how can i make this line not throw exception not found image? local p = numberOCR(r,"power")
|
|
|
Post by AnkuLua on Feb 14, 2018 23:57:24 GMT
numberOCRNoFindException() Just below the numberOCR()
|
|
zora
New Member
Posts: 22
|
Post by zora on Feb 19, 2018 14:51:52 GMT
thanks for help so there is way also to not throw exception for other things like waitclick and click image?
|
|
|
Post by AnkuLua on Feb 20, 2018 0:00:27 GMT
Use exists(), then click(getLastMatch()) For Region, you need to getLastMatch from the region
For example
if (exists(target.png)) then click(getLastMatch()) end
reg = Region(100, 200, 300, 400) if (reg:exists(target.png)) then click(reg:getLastMatch()) end
|
|