autoit hilfe

08/01/2008 13:23 [PixeL]#1
HotKeySet ( "{F9}" , "Start" )
HotKeySet ( "{F10}" , "stop" )

while 1
sleep (100)
WEnd

Func Start ()
While 1
$Pixel = PixelGetColor ( 154,56 )
If $Pixel = 0x090909 Then
Send ( " 4 " )
mousemove ( 123, 522 )
EndIf
WEnd
EndFunc



Func stop ()
exit 0
EndFunc






was ist hirdran falsch ??? wen ich f9 drücke passirt nix
08/01/2008 13:47 wadimwadim#2
soweit ich weiss gibt pixelgetcolor(a,b) dir kein hexwert zurück.

Code:
HotKeySet( "{F9}", "Start" )
HotKeySet( "{F10}", "stop" )

while 1
  sleep(100)
WEnd

Func Start()
  While 1
    $Pixel = PixelGetColor( 154,56 )
    [COLOR="Red"]If $Pixel = dec('0x090909') Then[/COLOR]
      Send ( " 4 " )
      mousemove(123, 522)
    EndIf
  WEnd
EndFunc



Func stop()
  Exit
EndFunc
08/01/2008 14:28 Azunai#3
Quote:
was ist hirdran falsch ??? wen ich f9 drücke passirt nix
pixel wird nicht die farbe haben ;)

versuch mal mit pixelsearch

rückgabe ist egal, au3 rechnets selber um ;)

if 0xffffff = 376926741 then msgbox(0,"a","b")

klappt zb ;)
08/01/2008 14:51 kl00#4
wie geht pixelsearch
08/01/2008 14:58 wadimwadim#5
au3 hilfedatei ist die lösung :)
08/02/2008 14:50 Zephino#6
im not sure if this is going to help you but...

here is a simple function that will test and make sure that the mouse is in the right spot, give you the cords of that spot, give you the color and then put the color into the clipboard so you can paste it into the code.

i have it getting the window cords because then the window can be anywhere on the screen and it was easier for me to do it that way :P

if you want to move the cords just change the $x and the $y.


sorry if this is to late and im just making spam

Func test()
If Not WinActive($mainwindow) Then WinActivate($mainwindow)
Sleep(500)
Global $x = 940
Global $y = 710
$cords = WinGetClientSize($mainwindow)
$x = $cords[0] - $x
$y = $cords[1] - $y
$testx = $x
$testy = $y
MsgBox(1, PixelGetColor($testx, $testy), "X: " & $testx & " Y: " & $testy)
If Not WinActive($mainwindow) Then WinActivate($mainwindow)
MouseMove($testx, $testy, 1)
ClipPut(PixelGetColor($testx, $testy))
EndFunc


-Zephino