Jump to content

Recommended Posts

Posted

Hello, i'm pretty new to code, (i've launched myself today so this is my first time coding)..

I have an issue with something i want to make, it's simple, looking for 2 different pixel then if those pixel have the same X coordinate, press space.

That's what i got for the moment ; i know where the issue is but i can't find a way to compare the two "x" variable

HotKeySet("²", "espace")
HotKeySet("{ESC}","KillSwitch")

while 1
   Sleep(50)
Wend


Func espace()
   while 1
      $PIX = PixelSearch(793, 672, 1120, 692, 0x2DA6C7,0)
      $ARROW = PixelSearch(794, 690, 1119, 705, 0xE99800,0)
      if $PIX[0] == $ARROW[0] Then
         Send("{SPACE}")
      EndIf
   WEnd
EndFunc

Func KillSwitch()
   Exit
EndFunc

 

  • Developers
Posted

Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

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.
  :)

  • Developers
Posted

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.
  :)

Guest
This topic is now closed to further replies.
×
×
  • Create New...