Sign in to follow this  
Followers 0
HomeScript

Find bmp in bmp not working

6 posts in this topic

 Hi, I want to search BMP in another BMP using this function: I have "Error locking screen 1". My code:

$BMP1 = @ScriptDir & "\scrdbg.bmp"
$BMP2 = @ScriptDir & "\tru.bmp"
findBMP($BMP1,$BMP2, 1)

Share this post


Link to post
Share on other sites



The thread and code are 7 years old. Have you read the entire thread to see if anyone else had the same issue? Have you searched the forum for other people who wanted to do what you are doing and see the issues they have? You may find your solution there.

Share this post


Link to post
Share on other sites

The findbmp code is still valid but information is needed on win version and autoit version and most likely it has to do with gdi version. In the findbmp thread there are basic instructions on how to check basic gdi stuff.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

Is there another code to search bitmap in bitmap?

Edit:

I fixed this, but how to get x, y axis? My code: 

#include <GDIPlus.au3>
#Include <ScreenCapture.au3>
#include <string.au3>
#include <BmpSearch.au3>

$bDebug = False
Const $cMatchLinePercentage=0.99

const $c24RGBFullMatch=1 ;Load as 24 bits and full match
const $c24RGBPartialMatch=2 ;Load as 24 bits and partial match
const $c16RGBFullMatch=3 ;Load as 16 bits and full match
const $c16RGBPartialMatch=4 ;Load as 16 bits and partial match
Global const $Bitmap1Filename = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\CALCULATOR.BMP")
Global Const $Bitmap2Filename = _GDIPlus_ImageLoadFromFile(@scriptDir & "\BACKSPACE.BMP")

findTester($Bitmap1Filename,$Bitmap1Filename,$c24RGBPartialMatch)

Func FindTester($BMP1, $BMP2, $Bool)
local $tResult
_GDIPlus_Startup ()
$start = TimerInit()
$tResult=findBMP($BMP1,$BMP2, $Bool)
ConsoleWrite($tResult)
EndFunc

_GDIPlus_Shutdown()

 

Edited by HomeScript

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
Sign in to follow this  
Followers 0