Image Recognition Help
Moderators: Dorian (MJT support), JRL
Image Recognition Help
Hi,
If i have to achive an end to end automation using only image recognition feature then how do i script the following scenerio:
There is a checkbox on one of the window opened inside a remote desktop screen. The image of this chekbox and its message is my reference image. Now screenCapture will capture the entire desktop, i want to capture only checkbox section in the whole screen and compare if it is matches with the reference image. Is this possible? Can i get the coordinates of only checkbox image somehow? Does FindImagePos command returns the coordinates of the image to be found on the screen? This section is not very clear in the help document.
Regards,
Aks
If i have to achive an end to end automation using only image recognition feature then how do i script the following scenerio:
There is a checkbox on one of the window opened inside a remote desktop screen. The image of this chekbox and its message is my reference image. Now screenCapture will capture the entire desktop, i want to capture only checkbox section in the whole screen and compare if it is matches with the reference image. Is this possible? Can i get the coordinates of only checkbox image somehow? Does FindImagePos command returns the coordinates of the image to be found on the screen? This section is not very clear in the help document.
Regards,
Aks
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
FindImagePos returns EITHER the upper left coordinate of a match, or the center position of a match, depending on what the value of the CENTER parameter is.
FindImagePos will return the number of matches found and all X,Y coordinates of each match are returned in the specified X, Y arrays.
Have you seen the following tutorial and video:
http://www.mjtnet.com/blog/2007/02/20/h ... cognition/
FindImagePos will return the number of matches found and all X,Y coordinates of each match are returned in the specified X, Y arrays.
Have you seen the following tutorial and video:
http://www.mjtnet.com/blog/2007/02/20/h ... cognition/
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Hi Marcus,
yes i refered the demo as well as blog on image recognition. Using the same approch given in the blog a smaller image is found in the screen image using FindImagePos. Now as you explained FindImagePos will return the cordinates of the smaller image. Using these cordinates can i recapture only that smaller image for validation?
Thanks & Regards,
Aks
yes i refered the demo as well as blog on image recognition. Using the same approch given in the blog a smaller image is found in the screen image using FindImagePos. Now as you explained FindImagePos will return the cordinates of the smaller image. Using these cordinates can i recapture only that smaller image for validation?
Thanks & Regards,
Aks
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Yes, if you set FindImagePos to return the top left position, and you know the dimensions of the image you are seeking (you made it) you can then simply use ScreenCapture passing the upper left position as returned by FindImagePos and adding the dimensions to that position to determine the lower right bounds.
E.g., if your needle was 10x10 pixels:
E.g., if your needle was 10x10 pixels:
Code: Select all
FindImagePos>needle,SCREEN,0,0,Xs,Ys,n
If>n>0
//for this example just get first match
Let>x1=Xs_0
Let>y1=Xs_0
Let>x2=x1+10
Let>y2=y1+10
ScreenCapture>x1,y1,x2,y2,c:\newbmp.bmp
Endif
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
I tried doing that but i guess i am going wrong in specifying the dimension of the image. Needle image dimensions is 32x29
FindImagePos>needle,SCREEN,0,0,Xs,Ys,n
If>n>0
//for this example just get first match
Let>x1=Xs_0
Let>y1=Xs_0
Let>x2=x1+32
Let>y2=y1+29
ScreenCapture>x1,y1,x2,y2,c:\newbmp.bmp
Endif
But this does not capture the exact image. I am trying to find a menu inside a wordpad opened inside a remote desktop window.
FindImagePos>needle,SCREEN,0,0,Xs,Ys,n
If>n>0
//for this example just get first match
Let>x1=Xs_0
Let>y1=Xs_0
Let>x2=x1+32
Let>y2=y1+29
ScreenCapture>x1,y1,x2,y2,c:\newbmp.bmp
Endif
But this does not capture the exact image. I am trying to find a menu inside a wordpad opened inside a remote desktop window.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Both x1 and y1 have been set to Xs_0. 5th line should be:
Let>y1=Ys_0
Let>y1=Ys_0
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Well I doubt Macro Scheduler is in your path so you probably need to specify the full path to Macro Scheduler:
"c:\program files\macro scheduler\msched.exe" mymacro
Change the path to suit your system.
Also, if you installed Macro Scheduler with the defaults then .scp files will be associated with Macro Scheduler so you can just call a .scp file directly:
"c:\my documents\macro scheduler\calculator.scp"
"c:\program files\macro scheduler\msched.exe" mymacro
Change the path to suit your system.
Also, if you installed Macro Scheduler with the defaults then .scp files will be associated with Macro Scheduler so you can just call a .scp file directly:
"c:\my documents\macro scheduler\calculator.scp"
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 2
- Joined: Wed Nov 26, 2008 1:56 am
Access violation at address 006C99F4 in module 'msched.exe'.
I have spent many hours trying to get image recognition function to work. It seem very neat, but the video shows it done in an older version of scheduler. I get the following message each time I get to the "findImagePos" step:
Access violation at address 006C99F4 in module 'msched.exe'. Read of address 00000054.
Has anyone else ran into this message?
thanks,
Charles
Access violation at address 006C99F4 in module 'msched.exe'. Read of address 00000054.
Has anyone else ran into this message?
thanks,
Charles
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
I've not seen this before.
Which version are you using?
Can you provide your script and image files?
Which version are you using?
Can you provide your script and image files?
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
wow ive gotten that before and it wasnt macro scheduler that had the problem i had to update some dll files but i was on windows 98 when i got it i downloaded something to check my dll files and found a few that needed updates and once i updated em it fixed problem
if idiots rule the world then im the king!!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!
i want a free t-shirt give me all of your rep!!!
please give me pro version of macro scheduler and appnavigator!!!