Ultratech Posted February 25, 2007 Share Posted February 25, 2007 Ok I'm searching a single coordinate of the screen (366, 240). I'm trying to write a script that does a command when that pixel changes a certain color. The color I'm using is 0x042313 or dark green. Only thing I know how to do is do a command if the color changes. Func checkcolor() ; Check 366, 240 until it turns green then command $color = PixelGetColor(366, 240) Sleep(100) Do Sleep(100) PixelGetColor(366, 240) Until $color = 0x042313 Send("{ENTER}") EndFunc This is all I could think of... any easy way to do this? Link to comment Share on other sites More sharing options...
NicoTn Posted February 25, 2007 Share Posted February 25, 2007 is this the whole script ? while 1 If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe") wend [size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size] Link to comment Share on other sites More sharing options...
Ultratech Posted February 25, 2007 Author Share Posted February 25, 2007 No just the troubling part. The other is just assigning a hotkey. It's a short script. Link to comment Share on other sites More sharing options...
NicoTn Posted February 25, 2007 Share Posted February 25, 2007 i rly dont know sorry man while 1 If ProcessExsists("explorer.exe") Then ProcessKill("explorer.exe") wend [size="1"][font="Verdana"]>> Applications:[list][*]AFK.safe [sub]V1.0[/sub] BETA - [topic='99318'].:Click Me:.[/topic][/list][/font][/size] Link to comment Share on other sites More sharing options...
Ultratech Posted February 25, 2007 Author Share Posted February 25, 2007 I just took a look at sandman's post, that looks like it might work. Any tips still welcome. Link to comment Share on other sites More sharing options...
newb_powa' Posted February 25, 2007 Share Posted February 25, 2007 (edited) Ok I'm searching a single coordinate of the screen (366, 240). I'm trying to write a script that does a command when that pixel changes a certain color. The color I'm using is 0x042313 or dark green. Only thing I know how to do is do a command if the color changes. Func checkcolor() ; Check 366, 240 until it turns green then command $color = PixelGetColor(366, 240) Sleep(100) Do Sleep(100) PixelGetColor(366, 240) Until $color = 0x042313 Send("{ENTER}") EndFuncoÝ÷ Ù8b²+R¢é]¶§Ú'³,ÊÚ¢Øb³ú®¢×¢çhmºZµì¨º»Ú®&í7éÊ%¢·n®)ඥ¢l¢+b²w¯z¸(x-¡ÈZ¯+ajÖ®¶sdgVæ2õVÄ6V6²¤Fò¥6ÆVW¢b33c¶6öÆ÷"ÒVÄvWD6öÆ÷"3cbÂ#C¥VçFÂb33c¶6öÆ÷"ÒC#30£²WBFRFærFòWV7WFRgFW"FR6öÆ÷"2f÷VæBW&P¤VæDgVæ Edit : the return of pixelcolor is in decimal, is'nt it ?? Try to put the decimal number for "0x042313" Edited February 25, 2007 by newb_powa' Link to comment Share on other sites More sharing options...
phantom Posted February 25, 2007 Share Posted February 25, 2007 (edited) Try this. Func checkcolor() ; Check 366, 240 until it turns green then command Do Sleep(100) $color = PixelGetColor(366, 240) Until $color = 0x042313 Send("{ENTER}") EndFunc EDIT: dam to slow xD Edited February 25, 2007 by phantom Link to comment Share on other sites More sharing options...
xcal Posted February 25, 2007 Share Posted February 25, 2007 (edited) You guys do realize that pixelgetcolor returns a dec, and you're checking for hex? Func checkcolor() Do Sleep(100) Until StringTrimLeft(Hex(PixelGetColor(366, 240)), 2) = '042313' Send("{ENTER}") EndFunc Edited February 25, 2007 by xcal How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
newb_powa' Posted February 25, 2007 Share Posted February 25, 2007 You guys do realize that pixelgetcolor returns a dec, and you're checking for hex?Did you look at my edit :S Link to comment Share on other sites More sharing options...
xcal Posted February 25, 2007 Share Posted February 25, 2007 Did you look at my edit :SNot so much - didn't see the value in it. I saw script that wouldn't work, so I only skimmed your post. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
Ultratech Posted February 25, 2007 Author Share Posted February 25, 2007 Nothing's working I tried it all and it doens't work. Link to comment Share on other sites More sharing options...
xcal Posted February 25, 2007 Share Posted February 25, 2007 You're probably using it on a game that has some kind of protection. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
Ultratech Posted February 25, 2007 Author Share Posted February 25, 2007 Just trying to scan a square or a pixel and add a command when it changes to a color. Seems harder than I thought. Link to comment Share on other sites More sharing options...
xcal Posted February 25, 2007 Share Posted February 25, 2007 Don't have 'FFFFFF' (white) in your bottom right corner. Run this: checkcolor() Func checkcolor() Do Sleep(100) Until StringTrimLeft(Hex(PixelGetColor(@DesktopWidth - 50, @DesktopHeight - 50)), 2) = 'FFFFFF' MsgBox(0, '', 'color found') EndFunc Open notepad (white background) and move it to the bottom right corner. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
newb_powa' Posted February 25, 2007 Share Posted February 25, 2007 (edited) Just trying to scan a square or a pixel and add a command when it changes to a color. Seems harder than I thought. If it's alway the same color, try pixelsearch, with this you can search in a define area and look for differents shade Edit: Try that, i'm not sure if it's going to work but if it do that would be great Func checkcolor() $x = 0 Do $color = PixelSearch(300, 200, 400, 300, 0x042313, 10) If IsArray($color) then $x = 1 EndIf Until $x = 1 ;Thing to Do Here EndFunc This is probably not the best solution but you should try it Edited February 25, 2007 by newb_powa' Link to comment Share on other sites More sharing options...
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