Jump to content

nyrkl

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by nyrkl

  1. I'm trying to get this to work, and failing terribly! I'm trying to detect when the mousecursor changes to something I am interested in. Local $xr = 0 Local $yr = 0 For $i=1 To 600 Local $mpos = MouseGetPos() Local $fnd = _ImageSearchArea("fish.png", 1, $mpos[0]-5, $mpos[1]-5, $mpos[0]+50, $mpos[1]+50, $xr, $yr, 200, 0x000000) _ScreenCapture_Capture("R:\Capture-"&$i&"-r"&$fnd&".png", $mpos[0]-5, $mpos[1]-5, $mpos[0]+50, $mpos[1]+50) sleep(50) Next So I take a snapshot everytime I do a comparison, but the result from _ImageSearchArea() is always 0. The 3 attached images are my comparison file, and two consecutive dumps of the area around the cursor. If I load my fish.png into an image editor, strip out the solid black, and paste it into the matching grab, I can see its the same size and the pixels match perfectly. Can anyone help ?
  2. I've just found these forums via a google search - since this is something that I also want to do (if I read the OP right!) I have a need to detect when the cursor icon changes, and then do something. If there is another way to do this, then Id love to hear it!
×
×
  • Create New...