Image Recognition in Edge problem.

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
rullbandspelare
Pro Scripter
Posts: 149
Joined: Tue Mar 23, 2004 9:11 pm

Image Recognition in Edge problem.

Post by rullbandspelare » Tue Dec 14, 2021 10:39 am

Hi!
I have created a WaitScreenImage> to find a image in Edge web browser.
This works on my PC, cos i have the same screen resolution and zoom level in Edge as the needle image.
But when I run on other PC with 4K monitor and different Zoom level in Edge, then it fails!
I have tired CCOEFF with 0.5 sensitivity , but then is detects wrong.

I have also tried to start a StartEdge session with correct version of msedgedriver.exe. But I get
ERROR: Line: 242 - (1:1) Unquoted string in JSON data only valid for dictionary names.
When i run
Let>EDGEDRIVER_EXE=c:\msedgedriver.exe
EdgeStart>session_id


Any input is appreciated!

Thanks!

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1380
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Image Recognition in Edge problem.

Post by Dorian (MJT support) » Tue Dec 14, 2021 11:17 am

For the first issue, resample the image on your other PC.

For the error message, read this.
Yes, we have a Custom Scripting Service. Message me or go here

rullbandspelare
Pro Scripter
Posts: 149
Joined: Tue Mar 23, 2004 9:11 pm

Re: Image Recognition in Edge problem.

Post by rullbandspelare » Thu Dec 16, 2021 9:49 pm

Thanks!

I have created different sizes and that works ok.
But...
Running V15.0.11

1. FindImagePos>%BMP_DIR%\Zoom_75.bmp,SCREEN,0.9,1,XArr,YArr,NumFound,CCOEFF
Always return NumFound=1 after the PC locks and I login again. Only way to get it to detect correct again is to restart the application. I have tried SCREEN, WINDOW etc ect same result
WaitScreenImage> Works OK

2. Is there any way to detect the Zoom Level in a Edge browser? Without EdgeStart>

User avatar
Dorian (MJT support)
Automation Wizard
Posts: 1380
Joined: Sun Nov 03, 2002 3:19 am
Contact:

Re: Image Recognition in Edge problem.

Post by Dorian (MJT support) » Thu Dec 16, 2021 10:24 pm

Not that I'm aware of, but you could always reset it to default by setting focus to Edge with SetFocus and sending Ctrl-0

Press Ctrl
Send>0
Release Ctrl
Yes, we have a Custom Scripting Service. Message me or go here

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts