Kyme

ImageSearch files request

5 posts in this topic

#1 ·  Posted

Hello all

Can anybody please post a zip with working imagesearch example and dll for windows 10 pro 64bit?

i've tried almost all versions i've got and nothing, i end up with doing nothing for few minutes and after that it return 0 or returning 0.

as i said, i have win 10 pro 64bit, i've tried 32 and 64 bit versions and nothing, as almost all versions have some errors and as i read they can be fixed with ctrl+t but honestly i've spent more then 5h searching a working version and nothing...

i've set sciTE to run as admin, with #AutoIt3Wrapper_UseX64=n, all the combos i've tried nothing...

can somebody post a zip with needed files and a simple example for win 10 64bit please, i will provide a png for test(a section of screenshot i've made)

hopefully somebody would be kind to help me figure it out what i do wrong

it's not first time i use this udf but this time i don't know what's going on...i hope that there is an version for win10 because i ended in a opinion that it don't work under win10

regards, emanuel

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I can't recall but I believe I've used this script on one of our computers at work with a Windows 10 OS for mapping. Feel free to double check.

#include <ImageSearch.au3>
#include <GDIPlus.au3>

Global $y = 0, $x = 0
Global $i

ArcMap_SideBar()

Func ArcMap_SideBar()

    Local $aIcons[2], $i

    $aIcons[0] = @ScriptDir & "\Images\Image1.bmp"
    $aIcons[1] = @ScriptDir & "\Images\Image2.bmp"

    For $i = 0 To UBound($aIcons) - 1
        $result = _ImageSearch($aIcons[$i], 1, $x, $y, 20, 0)
        If $result > 0 Then
            MsgBox($MB_SYSTEMMODAL, "ArcGIS Desktop", "ArcGIS sidebar is active.", 10)
            ExitLoop
            Sleep(1000)
        EndIf
    Next

EndFunc   ;==>ArcMap_SideBar

 

Mapping.zip

Edited by aa2zz6

Share this post


Link to post
Share on other sites

#3 ·  Posted

can you please also post ImageSearch.au3, it's missing in zip

thank you

9 minutes ago, aa2zz6 said:

I can't recall but I believe I've used this script on one of our computers at work with a Windows 10 OS for mapping. Feel free to double check.

#include <ImageSearch.au3>
#include <GDIPlus.au3>

Global $y = 0, $x = 0
Global $i

ArcMap_SideBar()

Func ArcMap_SideBar()

    #include <ImageSearch.au3>
    Local $aIcons[2], $i

    $aIcons[0] = @ScriptDir & "\Images\Image1.bmp"
    $aIcons[1] = @ScriptDir & "\Images\Image2.bmp"

    For $i = 0 To UBound($aIcons) - 1
        $result = _ImageSearch($aIcons[$i], 1, $x, $y, 20, 0)
        If $result > 0 Then
            MsgBox($MB_SYSTEMMODAL, "ArcGIS Desktop", "ArcGIS sidebar is active.", 10)
            ExitLoop
            Sleep(1000)
        EndIf
    Next

EndFunc   ;==>ArcMap_SideBar

 

Mapping.zip

 

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Here you go. Make sure it's placed in the AutoIt3>Include folder

Edit: I tested this on a VM window10 pro on my home PC and it's working. Let me know if you have any issues

ImageSearch.au3

Edited by aa2zz6
Spelling errors :|

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

thank you. i guess the problem it's from the dll, it seems that sometimes it founds the match sometimes not, i've tried on start button, few icons in an open folder with no success, even with tolerance 200(sometimes it returns 1 but the x y are false), but when i tried on my computer icon it worked, and i've tried multiple format for image bmp 256/24bit jpg,png, gif(with high tolerance due the detail decrease) for all tests

the strange part is that every time when imagesearch it's called the taskbar flashes, i guess after all it is from dll or i am too dumb...

here's the script i've used, maybe someone will have a clue that the heck it's going on with it.

 

Edit: what kind of format for image did you used?i've tried them all what paint support and almost nothing.

the taskbar flashes in your VM too? i mean a short flash?with 24bit bmp and tolerance 200 it works but x y are a little off, they go on next icon on the right.

also, do you use the lastest version of autoit?

 

Edit2: mistery solved, on my server with same OS works as oiled so i guess something it's messed up with my system

thank you a lot sir, now i can peacefully sleep knowing the problem

in the end i've used bmp 24 and worked, on my machine fail to do so

regards, emanuel

#AutoIt3Wrapper_UseX64=n
#include <ImageSearch.au3>
Global $y = 0, $x = 0

While 1
test()
WEnd

Func test()
    $Icon = @ScriptDir & "\1.bmp"
        $result = _ImageSearch($Icon, 0, $x, $y, 200, 0)
        If $result > 0 Then
            MsgBox(0, "found", $result)
            MouseMove($x,$y)
        Else
            MsgBox(0, "not found", $result)
        EndIf

EndFunc

 

Edited by Kyme

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