Jump to content

Recommended Posts

  • Moderators

http://www.autoitscript.com/forum/index.php?showtopic=95367

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 post
Share on other sites
  • Moderators

It gives error in such case

The search is still right to left, however, you can (as stated in the post before yours) work it bottom to top or top to bottom.

( You have to make sure you are using Beta however ( if in SciTe use Alt+F5 to Run ( or Alt+F7 to compile ) beta ).

Having said that, and confirming with a Dev, this does in fact work both ways for me:

#include <Misc.au3>
If _VersionCompare(@AutoItVersion, "3.3.1.0") < 0 Then
    MsgBox(16, "Error", "You are running " & @AutoItVersion & ", not 3.3.1.0")
    Exit
EndIf

Global $a_search = PixelSearch(2, 400, 400, 700, 0xFFFFFF)
If @error Then
    MsgBox(16, "Error", "No Match", 2)
Else
    MsgBox(64, "Match", "Top to Bottom Search" & @CRLF & "x: " & $a_search[0] & @CRLF & "y: " & $a_search[1])
EndIf

$a_search = PixelSearch(2, 700, 400, 400, 0xFFFFFF)
If @error Then
    MsgBox(16, "Error", "No Match", 2)
Else
    MsgBox(64, "Match", "Bottom to Top Search" & @CRLF & "x: " & $a_search[0] & @CRLF & "y: " & $a_search[1])
EndIf

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 post
Share on other sites

The search is still right to left, however, you can (as stated in the post before yours) work it bottom to top or top to bottom.

( You have to make sure you are using Beta however ( if in SciTe use Alt+F5 to Run ( or Alt+F7 to compile ) beta ).

Having said that, and confirming with a Dev, this does in fact work both ways for me:

#include <Misc.au3>
If _VersionCompare(@AutoItVersion, "3.3.1.0") < 0 Then
    MsgBox(16, "Error", "You are running " & @AutoItVersion & ", not 3.3.1.0")
    Exit
EndIf

Global $a_search = PixelSearch(2, 400, 400, 700, 0xFFFFFF)
If @error Then
    MsgBox(16, "Error", "No Match", 2)
Else
    MsgBox(64, "Match", "Top to Bottom Search" & @CRLF & "x: " & $a_search[0] & @CRLF & "y: " & $a_search[1])
EndIf

$a_search = PixelSearch(2, 700, 400, 400, 0xFFFFFF)
If @error Then
    MsgBox(16, "Error", "No Match", 2)
Else
    MsgBox(64, "Match", "Bottom to Top Search" & @CRLF & "x: " & $a_search[0] & @CRLF & "y: " & $a_search[1])
EndIf

Thanks SmOke_N, MvGulik.

It's my mistake. I changed top, bottom and left, right in one time.

SmOke_N's example is working.

Only "left-to-right" and can switch betwen "top-to-bottom" and "bottom-to-top".

Link to post
Share on other sites
  • Moderators

This works only vertically?

I need to reverse the horizontal: right to left. I changed the coordinates of the left & right places:

PixelSearch ( 353, 6, 0, 6, $color , 10 , 1 , $winL2)

But not working

http://www.autoitscript.com/trac/autoit/ticket/351

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 post
Share on other sites
  • 11 months later...

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...