Jump to content
Sign in to follow this  
Grex

PixelGetColor

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 :)

Share this post


Link to post
Share on other sites

hmm sry, but

("PixelCorrdMode",1) is not a command,...

what do you mean? Sorry, but I work today with that prorgramm, my last scripting was for 1 year,... :)

Cheers

Grex

Share this post


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

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  

×
×
  • Create New...