Scuse me if post in Italian but forum for MacroScheduler in ITALY is out.
Uso spesso la funzione FindImagePos per la ricerca di parti di immagini presenti su siti WEB dopo avere salvato precedentemente come .bmp porzioni del video.
Accade però che se la finestra WEB viene spostata leggermente di posizione, la mia immagine non venga più riconosciuta, anche variando il parametro "color_tolerance"
FindImagePos>bitmap_to_find,bitmap_to_scan|SCREEN,color_tolerance,return_center,X_Array,Y_Array,NumFound
o modificando il valore "Let>FIP_SCANPIXELS=90".
Questo è parte del mio codice e ultimamente crea più problemi con risoluzioni dei monitor in versione 4K.
FindImagePos>D:\LAVORI\Scheduler email\ricorda.bmp,SCREEN,30,X,Y,NumFound
If>NumFound>0
Msg>VALIDA
Wait>1
Io uso una vecchia versione 11 e volevo sapere se sulle successive versioni è stato migliorato il riconoscimento.
Come potete vedere dall'immagine qui caricata le scritte sembrerebbero identiche, ma se zoomate la foto, vedrete che le sfumature attorno ai testi sono completamente differenti.
FindImagePos
Moderators: Dorian (MJT support), JRL
- Dorian (MJT support)
- Automation Wizard
- Posts: 1378
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: FindImagePos
I would imagine it's more likely the browser dimensions have changed, possibly changing the visual properties of the image, rather than the screen position causing a problem. I've also seen this happen if browser magnification settings have been changed.
Your example has the Offset and Algorithm parameters missing, too, but may be that was typed from memory. It should look more like this :
This is what the help file has to say about Tolerance with Exact :
Your example has the Offset and Algorithm parameters missing, too, but may be that was typed from memory. It should look more like this :
Code: Select all
//Find and Left Click Center of
FindImagePos>D:\LAVORI\Scheduler email\ricorda.bmp,SCREEN,30,1,X,Y,NumFound,EXACT
If>NumFound>0
Msg>VALIDA
Endif
..so increasing the tolerance from 30 might help.If larger than zero the red, green and blue values of the pixels in bitmap_to_scan are checked to see if they are within the tolerance specified (color value + or - tolerance). Smaller values match less and larger values match more.
Yes, we have a Custom Scripting Service. Message me or go here
Re: FindImagePos
I don't know the "Offset and Algorithm" parameters. Can you explain to me how they work?
What is that EXACT value you entered in the row?
I don't know the "Offset and Algorithm" parameters. Can you explain to me how they work?
What is that EXACT value you entered in the row?
I changed the tolerance from 30 to 100 in increments of 10 but nothing changes as does the parameter FIP_SCANPIXELS = 100
What is that EXACT value you entered in the row?
I don't know the "Offset and Algorithm" parameters. Can you explain to me how they work?
What is that EXACT value you entered in the row?
I changed the tolerance from 30 to 100 in increments of 10 but nothing changes as does the parameter FIP_SCANPIXELS = 100
- Dorian (MJT support)
- Automation Wizard
- Posts: 1378
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: FindImagePos
That is all explained in depth here : http://www.mjtnet.com/manual/index.html ... agepos.htm
Yes, we have a Custom Scripting Service. Message me or go here
Re: FindImagePos
My problem is that I still have the ver. 11 by MacroScheduler.
Unfortunately, until I find a profitable benefit, I cannot afford to make updates.
Since the FindImagePos not recognized problem depends on moving the Chrome navigation window, what command can I use to make a web window always open in the same place with the same coordinates? I cannot put the web window in full screen also because in this case I would not have the problem described above.
Unfortunately, until I find a profitable benefit, I cannot afford to make updates.
Since the FindImagePos not recognized problem depends on moving the Chrome navigation window, what command can I use to make a web window always open in the same place with the same coordinates? I cannot put the web window in full screen also because in this case I would not have the problem described above.
- Dorian (MJT support)
- Automation Wizard
- Posts: 1378
- Joined: Sun Nov 03, 2002 3:19 am
- Contact:
Re: FindImagePos
I may have picked up on the version if the post was in English. We don't support version 11 as it's 11 years old.
To answer the move/size window question, these were all introduces in V5 :
http://www.mjtnet.com/manual/index.html ... action.htm
https://www.mjtnet.com/manual/index.htm ... ewndow.htm
http://www.mjtnet.com/manual/index.html?movewindow.htm
To answer the move/size window question, these were all introduces in V5 :
http://www.mjtnet.com/manual/index.html ... action.htm
https://www.mjtnet.com/manual/index.htm ... ewndow.htm
http://www.mjtnet.com/manual/index.html?movewindow.htm
Yes, we have a Custom Scripting Service. Message me or go here