Jump to content
safriduo

Requesting WORKING example of imagesearch script on win10

Recommended Posts

safriduo

every other tutorial is widely outdated or does not work on windows 10. we need something working out of the box. 

now you look at this and tell me if its working or not? 

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

$fileA = @ScriptDir & "\testa.png"

_GDIPlus_Startup()

$hImageA =_GDIPlus_ImageLoadFromFile($fileA) ;this is the firefox icon use something else if you don't have it.
$hBitmapA = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImageA)

$x = 0
$y = 0

$result = _ImageSearch($hBitmapA, 1, $x, $y, 20, 0) ;Zero will search against your active screen
If $result > 0 Then
    MouseMove($x, $y)
EndIf

_GDIPlus_ImageDispose($hImageA)
_GDIPlus_Shutdown()

 

Share this post


Link to post
Share on other sites
JLogan3o13

Why would we tell you if something is not working for you? If you would like help on this forum, I would suggest approaching it with a better attitude than "This is broken, someone fix it for me now", because (intentionally or otherwise) that is how you're coming across.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
safriduo

i tried several hours already fine tuning the script only to find its completely broken and not working whatsoever.

 

Share this post


Link to post
Share on other sites
safriduo

you guys, we need working imagesearch for win10...

Share this post


Link to post
Share on other sites
JLogan3o13

@safriduo please do not bump your posts without waiting 24 hours.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites
aa2zz6

Maybe search the forums and you'll find something that "maybe" works..

 

 

Share this post


Link to post
Share on other sites
careca

Using the image from the example

#include <ImageSearch.au3>
Local $HBMP = 0
Local $x1 = 0, $y1 = 0
Local $right = @DesktopWidth
Local $bottom = @DesktopHeight
Local $findImage = @ScriptDir&'\Capture.PNG'
While 1
    $result = DllCall("ImageSearchDLL.dll","str","ImageSearch","int",$x1,"int",$y1,"int",$right,"int",$bottom,"str",$findImage,"ptr",$HBMP)
    If $result[0]<>0 Then
        $array = StringSplit($result[0],"|")
        ConsoleWrite('XPos - '& $array[2] &' - YPos - '& $array[3] &' - XSize - '&$array[4]&' - YSize - '&$array[5]&@CRLF)
    EndIf
    Sleep(100)
WEnd

 


Spoiler

Paster - Main function is to paste text, but has more functions. (No longer mantained, switched to String Trigger)

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Firefox Profile Backup - Backup/restore previously saved profile.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

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

×