Jump to content

Recommended Posts

Posted

Hey guys! This is my first post. I have been using Autoit for about a day now, but I was needing a little help. I have searched for a while now and maybe I just missed it, but how do you go about breaking your searches out? The below is what I have. So far it works great, however I need to be able to add a message when some images are found and take a screen shot when that image is/isn't found. Any help would be great! Thanks everyone!!

#include <ImageSearch.au3>

HotKeySet("s", "start")

$x = 0
$y = 0

Func Start()
   $search = _imageSearch('Bids.bmp',0, $x, $y, 0)
   if $search = 1 Then
      MouseMove($x, $y, 1)
      MouseClick('left',$x ,$y ,1)

      $search = _imageSearch('Bid Reports.bmp',0, $x, $y, 0)
         MouseMove ($x, $y, 1)
         Sleep(800)

      $search = _imageSearch('Print Bid Reports.bmp',0, $x, $y, 0)
         MouseClick('left',$x ,$y ,1)
         Sleep(2000)

      $search = _imageSearch('Bid Success Ratio.bmp',0, $x, $y, 0)
         MouseClick('left',$x ,$y ,1)
   EndIf
EndFunc

While 1
   Sleep(800)
WEnd

 

Posted
14 hours ago, Mo0C0w said:

I need to be able to add a message when some images are found and take a screen shot when that image is/isn't found.

Messages could be shown through MsgBox (...) function.  Screen shot can be made with UDF Screen Capture Management, look for _ScreenCapture_Capture (...) function in help file.

Make sure you got the latest version of ImageSearch :

 

lmk how it goes...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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