Jump to content

ImageSearch of several Pictures


Recommended Posts

Hello,

I want to use the ImageSearch function in order to search 10-15 different 15x15 Pixel pictures. But the problem is that the pictures are from a GIF you could say. So I'm just looking for one picture of it. Using ImageSearch to find 1 picture in a gif, there is no problem. But when I do something like 10 If functions to find one of the 10 pictures, the script doesn't find them:

While 1
      $IS = _ImageSearch("weissgelb.png",1,$outputx,$outputy,40)
      If $IS = 1 Then
         MouseClick("left",$outputx,$outputy,1)
         wartenaufglitzieinsammlung()
      EndIf
      $IS = _ImageSearch("gelb.png",1,$outputx,$outputy,40)
          If $IS = 1 Then
         MouseClick("left",$outputx,$outputy,1)
         wartenaufglitzieinsammlung()
         EndIf
      $IS = _ImageSearch("gruenblau.png",1,$outputx,$outputy,40)
          If $IS = 1 Then
         MouseClick("left",$outputx,$outputy,1)
         wartenaufglitzieinsammlung()
         EndIf
      $IS = _ImageSearch("orange.png",1,$outputx,$outputy,60)
          If $IS = 1 Then
         MouseClick("left",$outputx,$outputy,1)
         wartenaufglitzieinsammlung()
         EndIf
      $IS = _ImageSearch("weissgruen.png",1,$outputx,$outputy,40)
          If $IS = 1 Then
         MouseClick("left",$outputx,$outputy,1)
         wartenaufglitzieinsammlung()
      EndIf
          $IS = _ImageSearch("blaugelb.png",1,$outputx,$outputy,40)
          If $IS = 1 Then
         MouseClick("left",$outputx,$outputy,1)
         wartenaufglitzieinsammlung()
      EndIf
          $IS = _ImageSearch("hellblaugelb.png",1,$outputx,$outputy,50)
          If $IS = 1 Then
         MouseClick("left",$outputx,$outputy,1)
         wartenaufglitzieinsammlung()
      EndIf
        $IS = _ImageSearch("rotlila.png",1,$outputx,$outputy,50)
          If $IS = 1 Then
         MouseClick("left",$outputx,$outputy,1)
         wartenaufglitzieinsammlung()
         EndIf
   WEnd

My thesis is that while my desktop shows the fitting picture for picture 3, the script is actually searching for picture 11 so it doesn't react to picture 3. 

This way of searching many pictures is inefficient in my opinion so does someone know how to improve my script? With ImageSearchArea I would just get minimal improvement because I'm looking for almost my complete desktop. And also 15x15 pixel is the minimum size for the pictures because otherwise the script doesn't find them anyway. Or maybe there is a better function than ImageSearch in order to search for several pictures. Maybe also important information: When the script found one of the pictures I want to start a new function so it won't search anymore for the pictures. Maybe there is also an alternative or something that makes it more efficient than my actual script

My mother language is not english so feel free to ask me if you didn't understand something

 

sincerly

money

Link to comment
Share on other sites

Is it meant to be a play on Manipulation?

It's just a cool name in my opinion because it combines money with manipulation where you can interpret alot from but that's not the topic here :D

This sounds like a gamebot to me.

The picture names are colors in german, that function name means something like "wait for [item something, i guess] collection".

@OP: Read the rules?

No I just want to test something on moving pictures (video so to speak) and the efficiency of reacting to pictures. This doesn't have to deal with a gamebot. The function name is more or less random because I'm not far enough to code what to do next because I'm stuck with this problem

Please just post help and don't discuss about my script being illegal :/

Link to comment
Share on other sites

This is a gamebot. (for the game Seafight, i guess.). He crossposted this in the german forum where it's already removed.

Side note: I guess it's Seafight, because that is the only game i know which features items called "glitzi(s)" to collect. As the code clearly contains a function for collecting something called "glitzi", it has to be a bot. (Glitzi is also a famous cleaning sponge in Germany, but it's more likely to be a bot ;-) )

Edited by minx

I will answer every single PM, and you are free to ask anything anytime.

Link to comment
Share on other sites

  • Moderators

moneypulation,

Welcome to the AutoIt forums - and I agree with the "cool nick" comments. :)

But the "gamebot" evidence seems clear. Please read the Forum rules (the link is also at bottom right of each page) - particularly the bit about not discussing game automation - before you post again. Thread locked. :naughty:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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