Sign in to follow this  
Followers 0
dachi

Compare

3 posts in this topic

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

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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
Sign in to follow this  
Followers 0