Jump to content

Macro Send pixelsearch don't work - (Locked)


Recommended Posts

 

;;version1
HotKeySet("{F9}","dropOnOff")
HotKeySet("{F10}","ExitApp")
HotKeySet("{F8}","GetPixel")
Dim $nodrop = False
Func dropOnOff()
   If $drop = False Then
      $drop = True
      ToolTip("Atacando",0,0)
   Else
      $shoot = False
      Tooltip("F9 = Atacar, F10 = Fechar bot", 0, 0)
   EndIf
EndFunc

Func GetPixel()
    $pos = MouseGetPos()
$var = PixelGetColor( MouseGetPos(0),Mousegetpos (1) )
MsgBox(0,"The decimal color is", $var)
Sleep(500)
EndFunc

Func Exitapp()
   Exit
EndFunc

While True
   If $nodrop = True Then
      dim $drop = PixelSearch( 0, 0, @DesktopHeight, @DesktopWidth, 4521728)
      If Not @error Then
         Send("{e down}")
         Sleep(1000)
         Send("{e up}")
         Sleep(500)
      EndIf
   EndIf
WEnd

hello I'm trying to create a macro, when it finds a color pixel, it activates the "E" key, problem and nothing happens when this color appears, could you point me where this is wrong?

 

sorry my english, i'm using google translator

Link to comment
Share on other sites

  • Developers

Welcome to the AutoIt forum.

Unfortunately you appear to have missed the Forum rules on your way in. Please read them now - particularly the bit about not discussing game automation - and then you will understand why you will get no help and this thread will now be locked.

See you soon with a legitimate question I hope.

The Moderation team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...