Jump to content

PixelGetColor


Grex
 Share

Recommended Posts

Hello, I have a problem with PixelGetColor, here is my script:

run ( $path )
If ( PixelGetColor (552, 183 ) = 0x432C23 ) Then
send ( $username )
send ( "{TAB}" )
send ( $password )
send ( "{enter}" )

EndIf

If I go into the Game, he doesn't make anythink, but if I make:

run ( $path )
sleep ( 2000 )
If PixelSearch ( "", "", "", "", "0x432C23" ) Then
send ( $username )
send ( "{TAB}" )
send ( $password )
send ( "{enter}" )
Endif

So, if I make this it works.

But If the color is on the desktop, it can maybe write the login data on the wrong screen.

I debug it with "sleep" / delay.

But I want PixelGetColor.

Can anyone help me that the first script run?

Cheers

Grex

If you don't understand me, please let me know, sorry for my english, it's not the best :)

Link to comment
Share on other sites

;example
;read helpfile ;)
$username = "user"
$password = "pw"
$ur_color = 0xE47B09
; PixelSearch ( left, top, right, bottom, color [, shade-variation] [, step]] )
$coord = PixelSearch(0, 0 , @DesktopWidth, @DesktopHeight, $ur_color, 0, 5)
If Not @error Then
    MouseClick("left",$coord[0], $coord[1], 1, 0)
    send ( $username )
    send ( "{TAB}" )
    send ( $password )
    send ( "{enter}" )
ElseIf @error = 1 Then
    MsgBox(0, "error", "PixelSearch no match")
EndIf

read helpfile...

so long

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