Hi, until yesterday everything was working correctly.
Today despite restarted PC etc. the program no longer recognizes my images.
I also made a new test code but tells me -1.
Can you tell me where to look for the problem?
Code:
ScreenCapture>1160,96,1240,140,D:\LAVORI\_ARDUINO\MACRO\MK.bmp
Wait>1
WaitScreenImage>D:\LAVORI\_ARDUINO\MACRO\MK.bmp,25
FindImagePos>D:\LAVORI\_ARDUINO\MACRO\MK.bmp,25,1,X,Y,NumFound
If>WSI_RESULT=1
MSG>TROVATO
Endif
Result:
WSI_RESULT=-1
NUMFOUND=-1
Unrecognized images
Moderators: Dorian (MJT support), JRL
Unrecognized images
Last edited by mpsinfo on Wed Sep 01, 2021 5:04 pm, edited 1 time in total.
- Dorian (MJT support)
- Automation Wizard
- Posts: 1378
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: Unrecognized images
I'm not sure how it would have been working before as you seem to have all sorts of code missing. I suggest running it through the Find Image Wizard again to regenerate the code. Also don't forget the Endif after the If.
It should look more like this :
I may be being a bit slow here though as I can't figure out the purpose of the script. Because we're capturing an image with ScreenCapture (which we know exists because we just captured whatever is at those coordinates)... then we're waiting for it to appears (which we know it does)... and then we're finding it... and we already know it exists.
You're searching for the image you just created.
It should look more like this :
Code: Select all
ScreenCapture>1160,96,1240,140,D:\LAVORI\_ARDUINO\MACRO\MK.bmp
Wait>1
WaitScreenImage>D:\LAVORI\_ARDUINO\MACRO\MK.bmp,0,EXACT
FindImagePos>D:\LAVORI\_ARDUINO\MACRO\MK.bmp,SCREEN,0,1,XArr,YArr,NumFound,EXACT
If>WSI_RESULT=1
MSG>TROVATO
Endif
You're searching for the image you just created.
Yes, we have a Custom Scripting Service. Message me or go here
Re: Unrecognized images
That's right, even looking for the newly created image gave an error.
Today everything seems to be working OK.
Mystery.
Today everything seems to be working OK.
Mystery.