Post by Johnc on Nov 1, 2018 3:12:45 GMT
Hi Steve,
Congratulations on the release of MMM version 7.0.
It works well on my 200+ line macro!
I was pretty excited when I saw the Pixel Range new condition and I have just tried it out!
I am assuming that you need to get ALL the pixels to change in the range before it is evaluated true, right?
So I tried it out:
202 | IF | PIXEL RANGE | At Location [X:209 Y:385]::Size [W:3 H:3] | CHANGES::2::30::0 | CONTINUE
Unfortunately it is somewhat a hit and miss and I got stuck sometimes.
So I switched back to the old trusty Pixel color:
202 | IF | PIXEL COLOR | At Location [X:214 Y:385] | CHANGES::2::30::0 | CONTINUE
and it worked all the time!!
I have to say the color change on the webpage was pretty fast So I am guessing that the single PIXEL COLOR test
was much faster than the PIXEL RANGE test (9 tests in this case), and therefore the PIXEL COLOR was more reliable
in detecting such a fast color change. Please confirm if my train of thought is correct.
So for higher reliability, I would use pixel color over a large pixel range.
Another thing is that I cannot think of an application where I need to use pixel range over pixel color.
Seems to me that pixel color would work for me 99% of the time. I am sure others can probably come up with
an application where you must use pixel range instead of pixel color.
I have a new Condition suggestion though, which should be very easy to tweak from the current code and it should
be much faster and value added to the current pixel range:
The idea is that instead of detecting changes in a large range, just detect changes in 2 pixels farther apart.
e.g.
202 | IF | PIXEL RANGE | At Location [X:209 Y:385]::Displacement [W:3 H:3] | CHANGES::2::30::0 | CONTINUE
It will test pixels (209,385) and (212,388) only.
202 | IF | PIXEL RANGE | At Location [X:200 Y:400]::Displacement [W:100 H:100] | CHANGES::2::30::0 | CONTINUE
It will test pixels (200,400) and (300,500) only for changes. This should speed up the condition test and at the same time
test 2 pixels pretty far apart to confirm the webpage/image is indeed fully loaded.
Cheers, John
Congratulations on the release of MMM version 7.0.
It works well on my 200+ line macro!
I was pretty excited when I saw the Pixel Range new condition and I have just tried it out!
I am assuming that you need to get ALL the pixels to change in the range before it is evaluated true, right?
So I tried it out:
202 | IF | PIXEL RANGE | At Location [X:209 Y:385]::Size [W:3 H:3] | CHANGES::2::30::0 | CONTINUE
Unfortunately it is somewhat a hit and miss and I got stuck sometimes.
So I switched back to the old trusty Pixel color:
202 | IF | PIXEL COLOR | At Location [X:214 Y:385] | CHANGES::2::30::0 | CONTINUE
and it worked all the time!!
I have to say the color change on the webpage was pretty fast So I am guessing that the single PIXEL COLOR test
was much faster than the PIXEL RANGE test (9 tests in this case), and therefore the PIXEL COLOR was more reliable
in detecting such a fast color change. Please confirm if my train of thought is correct.
So for higher reliability, I would use pixel color over a large pixel range.
Another thing is that I cannot think of an application where I need to use pixel range over pixel color.
Seems to me that pixel color would work for me 99% of the time. I am sure others can probably come up with
an application where you must use pixel range instead of pixel color.
I have a new Condition suggestion though, which should be very easy to tweak from the current code and it should
be much faster and value added to the current pixel range:
The idea is that instead of detecting changes in a large range, just detect changes in 2 pixels farther apart.
e.g.
202 | IF | PIXEL RANGE | At Location [X:209 Y:385]::Displacement [W:3 H:3] | CHANGES::2::30::0 | CONTINUE
It will test pixels (209,385) and (212,388) only.
202 | IF | PIXEL RANGE | At Location [X:200 Y:400]::Displacement [W:100 H:100] | CHANGES::2::30::0 | CONTINUE
It will test pixels (200,400) and (300,500) only for changes. This should speed up the condition test and at the same time
test 2 pixels pretty far apart to confirm the webpage/image is indeed fully loaded.
Cheers, John