Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

screen change check



  • Please log in to reply
1 reply to this topic
17kimv old
  • Members
  • 151 posts
  • Last active: Oct 17 2019 09:33 PM
  • Joined: 01 Feb 2015

So I was woundering if it was posible to make a script that would remember how does the picture looks, and then check every 1 milisecond if anything changed. if it changes then make it click if not then just wait more.

thank you in advanced!



Exaskryz
  • Members
  • 3249 posts
  • Last active: Nov 20 2015 05:30 AM
  • Joined: 23 Aug 2012
✓  Best Answer

It is possible. The Gdip library might have a nice easy way to take a screenshot and save it to a file, and then you can ImageSearch. I don't know how well ImageSearch-ing with a lossless image the size of your screen would work, but it's worth a shot I guess. As soon as an ErrorLevel=1 comes up, the screen has changed.

 

But if you need a selective part of the screen to check, I think the Gdip library can do that too. (Sorry, no link, have to do a quick search on it - I have not used the Gdip library myself). Otherwise, it would be more reliable to use PixelGetColor and sample the color and see if it's any different from the last time. You'd have to identify which pixel(s) are capable of changing and sample it (or all of them, if you have a sufficiently small number to keep track of).

 

I can say that a 1 millisecond search time is ridiculously fast and will likely not be happening. You should be happy with a 30-300 millisecond search time depending on what approach you take.