Jump to content

question with screencapture, pixelchecksum


Recommended Posts

Hi,

I am experimenting on _ScreenCapture_Capture at the moment and wants to clarify something:

Return Value

Returns a handle to an HBITMAP if $sFileName is empty.

By Handle do you mean like a pointer to the actual data? New to AutoIT, so i am not familiar with the terms used/refered by AutoIT.

If so, how can i access this data? or more importantly, i would like to do a checksum/hash on it, ie to represent that part of the screen into a shorter data that i can easily compare with.

My intention is to do simple pattern recognition/comparison on a fix x1y1-x2y2 window.

A full time OCR would be better but that is slow unfortunately.

Considering i would like to do a checksum/hash, will PixelChecksum do the trick?

ie, can Pixelchecksum be used to represent a particular area's pattern? according to the document, pixelchecksum is intended to check for change in the area but not pattern.

what i want to do:

I want to monitor a spot in the desktop 100x10 pixels (LABEL) in a fix spot.

There are 8 possible patterns on that spot (ie 8 choices in the label)

depending on what the value on the label, an input will have correspondingly diffent set of possible answers.

i would therefore like the script to be able to answer this input field based on the pattern on this LABEL.

currently i am doing an imagesearch by comparing the fix spot LABEL with 8 diffent png files. though it is working, itis not efficient because it can take at most 8 imagesearches to find a match. as it is, it is taking 0.1 seconds to perform imagesearch and 8 of that is 0.8 seconds, average 0.4 seconds.

if somehow I can capture the area into a hash or string or integer, i can easily then do a SELECT CASE search which is extremely faster.

Link to comment
Share on other sites

This sounds a lot like a captcha, is that what you're trying to code for?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...