ssamko

Image Search

2 posts in this topic

Hello !

A few years ago user Sven changed the code of library imagesearch to find pictures with transparency. I dont know why...but this  option doesnt work for me.

Main treat: https://www.autoitscript.com/forum/topic/102430-imagesearch-reading-from-resources/#comment-727331 

When I try to find and image normally without any transparent elements it works normally....but when I add to transparecy option: 0xffffff

It doesnt work...unless my picture has white color on place which I want transparent.

Can you help me ? I would be very thankful.

Thnx !

my code:

#include <ImageSearch.au3>

HotKeySet("{ESC}", "_End")

Global $X=0
Global $Y=0

Sleep(1000)

While 1
  $Search = _ImageSearch('element.bmp',0,$x,$y,0,0xFFFFFF)
   If $Search = 1 Then
      MouseMove($x,$y,1)
      Sleep(1000)
   EndIf
 WEnd


Func _End()
exit
EndFunc

+I am adding a file which I am looking(element.bmp) for+library and its DLL

ImageSearch.au3

ImageSearchDLL.dll

element.bmp

Share this post


Link to post
Share on other sites



Problem is not from your script but from your file : Only gif and png support transparency. ;)

 


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

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