Sign in to follow this  
Followers 0
Guest esy

Pixelsearch - Exclude Area?

6 posts in this topic

hi all,

i need help with my script, I use pixelsearch to scan my hole screen

question: how can I ignore a specific area?

theres a little box on my screen that I will ignore

xcuse my bad english

p.s. here the code I use:

PixelSearch(0,0,1023,767,0xFF0000)

If IsArray($a) Then mouseclick("left",$a[0],$a[1], 1, 1)

Share this post


Link to post
Share on other sites



i need help with my script, I use pixelsearch to scan my hole screen

question: how can I ignore a specific area?

theres a little box on my screen that I will ignore

<{POST_SNAPBACK}>

You can't do that, because:

The search is performed top-to-bottom, left-to-right, and the first match is returned.

However, if it is a rectangle that you wish to ignore, this can be solved pretty eaisily. You can split the screen into 4 sections that avoid the rectalgle:
  • One to the left of the rectangle that goes from the top to the bottom of the screen.
  • One above the rectangle that borders the first region you did, and goes to the right side of the screen.
  • One below the rectanble that borders the first region you did, and goes to the right side of the screen.
  • Another that fills in the only rectangle left not checked.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

okay! I thank you for the help :ph34r:

Share this post


Link to post
Share on other sites

another problem:

How can I make this possible:

If Not IsArray($a, $b, $c) Then

**code**

I alway become an error If I use multiple variables in IsArray,

If Not IsArray($a and $b and $c) Then and If Not IsArray($a) and IsArray($:ph34r: and IsArray($c) Then also did not work

sorry for my very newbie code, I'm really new to autoit

excuse my english

Share this post


Link to post
Share on other sites

another problem:

How can I make this possible:

If Not IsArray($a, $b, $c) Then

**code**

I alway become an error If I use multiple variables in IsArray,

If Not IsArray($a and $b and $c) Then and If Not IsArray($a) and IsArray($:ph34r: and IsArray($c) Then also did not work

sorry for my very newbie code, I'm really new to autoit

excuse my english

<{POST_SNAPBACK}>

If Not (IsArray($a) and IsArray($:( and IsArray($c)) Then ; true when any of them isn't an array

:lol:


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

yoooooohoooooo it works! thanks man!

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