Grex Posted December 12, 2007 Posted December 12, 2007 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
Valuater Posted December 12, 2007 Posted December 12, 2007 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)
Grex Posted December 12, 2007 Author Posted December 12, 2007 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
Valuater Posted December 12, 2007 Posted December 12, 2007 no, it's not a command, but it "will" affect where the PixelGetColor() looks see help 8)
Grex Posted December 12, 2007 Author Posted December 12, 2007 i think I'm a idiot,... can you give me an example? Cheers Gre
b0ony Posted December 13, 2007 Posted December 13, 2007 ;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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now