Very specific screen captures

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Korliphon
Newbie
Posts: 3
Joined: Sat Sep 26, 2015 10:22 am

Very specific screen captures

Post by Korliphon » Sat Sep 26, 2015 10:32 am

Hello there. I'm having a tiny bit of difficulty here, and maybe somebody could help me or at least explain why, because it really doesn't make much sense to me. I'll post a couple of my codes for for my screencaptures here...

ScreenCapture>396,371,424,399,%TEMP_DIR%\screenrect.bmp
//Find
FindImagePos>C:\Users\Scrappy\Documents\Macro Scheduler 14\uparrow.bmp,%TEMP_DIR%\screenrect.bmp,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
Press Up
Endif

ScreenCapture>396, 371, 424, 399,%TEMP_DIR%\screenrect.bmp
//Find
FindImagePos>C:\Users\Scrappy\Documents\Macro Scheduler 14\rightarrow.bmp,%TEMP_DIR%\screenrect.bmp,0.7,1,XArr,YArr,NumFound,CCOEFF
If>NumFound>0
Press Right
Endif


Now both of these possibilities, being in the same little rectangle, isn't supposed to happen. Only one is supposed to be in that rectangle, but it acts as if both are in that little rectangle. I know that the .bmps don't show on here, and they are very much alike... same color, different directions. Any ideas? I even had the idea to manually edit out the background on the .bmp files that's shared within the rectangle that I'm attempting to get the arrows picked out of.

hagchr
Automation Wizard
Posts: 331
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Re: Very specific screen captures

Post by hagchr » Sat Sep 26, 2015 10:54 am

Hi, have you tried playing with the tolerance, eg increasing the 0.7 to 0.8 or 0.9 etc, or the algorithm CCOEFF vs EXACT?

Korliphon
Newbie
Posts: 3
Joined: Sat Sep 26, 2015 10:22 am

Re: Very specific screen captures

Post by Korliphon » Sat Sep 26, 2015 10:56 am

hagchr wrote:Hi, have you tried playing with the tolerance, eg increasing the 0.7 to 0.8 or 0.9 etc, or the algorithm CCOEFF vs EXACT?

I did try to play with the tolerance, and that didn't seem to work either, perhaps I'll try exact. Sorry, this is new to me. I'll let you know if it works.

Korliphon
Newbie
Posts: 3
Joined: Sat Sep 26, 2015 10:22 am

Re: Very specific screen captures

Post by Korliphon » Sat Sep 26, 2015 11:15 am

Hey man, thank you. Exact worked, but I had to recapture my .bmps after I deleted the background on them. I appreciate your help. Looking back at the time I spent on this, I feel kinda embarrassed now.

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