Jump to content

Recommended Posts

Posted

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

Posted

1st you might want to look at

Option("PixelCoordMode", 1) ;1=absolute, 0=relative, 2=client

this is releational to the entire screen/desktop or just the smaller (guessing) game screen

for the future, remember that the mouse uses a similar option for screen coordinates

8)

NEWHeader1.png

Posted

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

Posted

;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

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
×
×
  • Create New...