|
Post by podahmad on Jul 30, 2019 13:45:43 GMT
when ankulua find an image on screen it takes roughly 0.3 sec
but if it cant then its takes more than 3 second is there a way to reduce this time..that is wether ankulua find an image or not it should only take few 100 milliseconds
|
|
|
Post by Mercobots on Jul 30, 2019 15:35:31 GMT
when ankulua find an image on screen it takes roughly 0.3 sec but if it cant then its takes more than 3 second is there a way to reduce this time..that is wether ankulua find an image or not it should only take few 100 milliseconds Hi there, try using regions , usePreviousSnap() and reduce maximum waiting time to speed up the find process! exists(img , maximum waiting time) ReferencesRegion - ankulua.boards.net/thread/6/objects-methods-introduction-sikuli-compatible#RegionusePreviousSnap - ankulua.boards.net/thread/7/settings#usePreviousSnapSimple Testlocal timer = Timer() local R = Region(x,y,w,h) -- set your region local img = 'img.png' -- set your img -- print('1 --------------') exists('img.png') print(timer:set()) -- print('\n2 --------------') exists(img, 0) print(timer:set()) -- print('\n3 --------------') R:exists(img, 0) print(timer:set()) -- print('\n4 --------------') snapshot() R:exists(img, 0) print(timer:set()) usePreviousSnap(false)
|
|
|
Post by podahmad on Jul 30, 2019 16:29:37 GMT
when ankulua find an image on screen it takes roughly 0.3 sec but if it cant then its takes more than 3 second is there a way to reduce this time..that is wether ankulua find an image or not it should only take few 100 milliseconds Hi there, try using regions , usePreviousSnap() and reduce maximum waiting time to speed up the find process! exists(img , maximum waiting time) ReferencesRegion - ankulua.boards.net/thread/6/objects-methods-introduction-sikuli-compatible#RegionusePreviousSnap - ankulua.boards.net/thread/7/settings#usePreviousSnapSimple Testlocal timer = Timer() local R = Region(x,y,w,h) -- set your region local img = 'img.png' -- set your img -- print('1 --------------') exists('img.png') print(timer:set()) -- print('\n2 --------------') exists(img, 0) print(timer:set()) -- print('\n3 --------------') R:exists(img, 0) print(timer:set()) -- print('\n4 --------------') snapshot() R:exists(img, 0) print(timer:set()) usePreviousSnap(false)
Thanku so v much i didnt know exists has timeout as well
|
|