Jump to content

pixel search help - (Locked)


 Share

Recommended Posts

i wanna make a script (not huge if i possible) that searches a pixel for a color and if its not present move to a next one and repeat. 

something like:

func findGoods ($count)
   Sleep (1000)
   for $x = 1 to $count
      PixelSearch (1140,600,1140,600, 0x033F45,50)
      if (@error) Then
         MouseClick ("right" ,1140,600,1,1)
         Sleep (50)
      Else
         PixelSearch (1140,600,1140,640, 0x033F45,50)
         if (@error) Then
            MouseClick ("right" ,1140,640,1,1)
            Sleep (50)
         Else
            PixelSearch (1140,600,1140,680, 0x033F45,50)
            if (@error) Then
               MouseClick ("right" ,1140,680,1,1)
               Sleep (50)
            Else
            EndIf
         EndIf
   EndIf
   Next
EndFunc

 

This doesnt work. only right clicks the first slot and then moves to the next function. If anyone has a better Idea... I would much appreciate it

 

Link to comment
Share on other sites

And what are you trying to do? Using PixelSearch is almost never the answer...

Either way, you're searching in a line. Try using the AutoIt Window Info tool to see where those points actually are.

All my code provided is Public Domain... but it may not work. ;) Use it, change it, break it, whatever you want.

Spoiler

My Humble Contributions:
Personal Function Documentation - A personal HelpFile for your functions
Acro.au3 UDF - Automating Acrobat Pro
ToDo Finder - Find #ToDo: lines in your scripts
UI-SimpleWrappers UDF - Use UI Automation more Simply-er
KeePass UDF - Automate KeePass, a password manager
InputBoxes - Simple Input boxes for various variable types

Link to comment
Share on other sites

im trying to make a little bot that searches through inventory and if a slot is not empty (different color than the backround) it clicks to sell it. Its becoming painfull for my wrist doing this again and again

Link to comment
Share on other sites

I Changed my way of thinking and put a number of pixelsearch looking for possible colors of loot. once it clicks them they change color so it skips to the next etc. One line is bugged and clicks the same one again and again. Is there a way to log their results to find one what color is the  problematic one?

thank you in advance.

image.png.1ab975fb2b030a383c8bbada7d80ce66.png

ps. sorry if they are noobish questions, I just downloaded the program yesterday and never had experience with coding or boting or anything so if there are better ways of doing things im open to suggestions. I am just reading through examples and help files and thinking "what could work for me"

Link to comment
Share on other sites

  • Developers

@kosmas, Your thread posts has now been reported some 5 times by different users and they all seem to think you are automating a game.... is this the case?

Either way: Please read our forum rules to get yourself familiarized with them.

Jos

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

I am so very terribly sorry😳. Yes, this is the case and true, i didn't read the rules.  
To be honest, That was my first goal, and that's why I downloaded Autoit.  Now im not even playing anymore. I just explore a program i fell in love with😂

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