Sign in to follow this  
Followers 0
moneypulation

ImageSearch of several Pictures

9 posts in this topic

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

Share this post


Link to post
Share on other sites



If you find the picture use exitloop.

Where did you get that username?

Ok I'll try the exitloop.

My username? I made it up in my mind, why? :D

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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 :/

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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.

Share this post


Link to post
Share on other sites

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

1 person likes this

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______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

 

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0