Jump to content

Compare


dachi
 Share

Recommended Posts

Basicly what i want to do is to make the script search at a specific x,y -> x,y2 on the screen, gets the colors (the decimalcolor it has) and adds it to the other, therefore get a (hopefully) unique number which the script can refer to as a specific picture.

How I made myself clear enough :-/

imo it shuld be something along with this

$var1 = PixelGetColor( 10 , 100 )

$var2 = PixelGetColor( 10 , 101 )

$var3 = PixelGetColor( 10 , 102 )

$tot_var = $var1 + $var2 + $var3

but how do i make so it searches a database for $tot_var ?

the database shuld be in a regular txt file

/Dachi

Link to comment
Share on other sites

... how do i make so it searches a database for $tot_var ?

the database shuld be in a regular txt file

In the Help file that comes with AutoIt, functions you'll want to read up on and review their example code include:
  • FileOpen()
  • FileRead()
  • _FileReadTo Array()
  • FileWrite()
  • Dim
  • UBound()
  • Etc....
Personally, I would suggest only reading from the file at the beginning and using an Array for your searches. But only if you want a faster script, since accessing RAM is faster than accessing a HD, right Siao? :)

Welcome to AutoIt and the forum.

Link to comment
Share on other sites

  • Moderators

Basicly what i want to do is to make the script search at a specific x,y -> x,y2 on the screen, gets the colors (the decimalcolor it has) and adds it to the other, therefore get a (hopefully) unique number which the script can refer to as a specific picture.

How I made myself clear enough :-/

imo it shuld be something along with this

$var1 = PixelGetColor( 10 , 100 )

$var2 = PixelGetColor( 10 , 101 )

$var3 = PixelGetColor( 10 , 102 )

$tot_var = $var1 + $var2 + $var3

but how do i make so it searches a database for $tot_var ?

the database shuld be in a regular txt file

/Dachi

The work has already been done for you with PixelCheckSum().

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...