Jump to content

Help With PixelSearch loop!


Glyph
 Share

Recommended Posts

$8=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '8', 'Value not found' ))
$9=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '9', 'Value not found' ))
$10=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '10', 'Value not found' ))
$11=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '11', 'Value not found' ))
$12=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '12', 'Value not found' ))
$13=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '13', 'Value not found' ))
$14=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '14', 'Value not found' ))
$15=(IniRead( @ScriptDir & '\Settings.ini', 'HexCode', '15', 'Value not found' ))
$game=(IniRead( @ScriptDir & '\Settings.ini', 'Game', '16', 'Value not found!!' ))
$a=@DesktopHeight /2
$b=@DesktopWidth /2
HotKeySet ( "^+e" , "Quit" );Control+shift+e = QuitQ
AutoItSetOption ( "PixelCoordMode",0 );search area of active wiundow

Func Quit()
exit
endfunc

PixelSearch($a +20, $b +20, $a -20, $b -20, $8, 256)
If Not @error Then
    MouseDown("left down")
sleep(20)
    MouseDown("left up")
EndIf

How would i get this to work???

its not searching the color i need it to 0xFFFFFF

then once found i want it to Mouseclick left down then up!

Thank you in advance!

Edited by backstabbed

tolle indicium

Link to comment
Share on other sites

$coord = PixelSearch($a +20, $b +20, $a -20, $b -20, $8, 10)
If Not @error Then
    MouseClick($coord[0], $coord[1])
EndIf

Your shade variation exceeded the bounds set out in the PixelSearch function, I'm surprised it even evaluated itself. I also cleaned up the way it clicks the mouse, hope that helps :P

IE Dev ToolbarMSDN: InternetExplorer ObjectMSDN: HTML/DHTML Reference Guide[quote]It is surprising what a man can do when he has to, and how little most men will do when they don't have to. - Walter Linn[/quote]--------------------[font="Franklin Gothic Medium"]Post a reproducer with less than 100 lines of code.[/font]
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...