sparky

Image search AutoIt v3.3.14

12 posts in this topic

#1 ·  Posted

Hy all,

I have some problems with image search. I have downloaded the image search Dll and the image search au3 script but i didn't manage to find a image. The DllCall return a 0 string.

Tkanks in advance

Share this post


Link to post
Share on other sites



#3 ·  Posted

I have problems. The script doesn't search anything. When i try to search an image with _ImageSearch function my program carsh.

Share this post


Link to post
Share on other sites

#4 ·  Posted

.. and you seriously think we can help you when you give no real information? I wish i was that smart as I could make a lot of money. ;)


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#5 ·  Posted

What can i say more? Or what are relevant informations for you?

Share this post


Link to post
Share on other sites

#6 ·  Posted

Come on...  Ok let 's start simple:

  1. What are you trying to automate? (Which application/Use case)
  2. Show the script you have that doesn't work.
  3. What have you tried?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#7 ·  Posted

I'm training myself.

I want to open a chrome browser and search something doesn't matter what.

This is my script

#include <ImageSearch\ImageSearch.au3>

HotKeySet("p", "checkForImage")

Func checkForImage()
    Local $x = 0, $y = 0
    ConsoleWrite("Call image search")
    Local $search = _ImageSearch("$imgesDir" & "chrome.bmp", 100, $x, $y, 0)
    If $search = 1 Then
        ConsoleWrite("Image is at : " & $x & "-" & $y)
    EndIf
EndFunc

while 1
sleep(200)
WEnd

and i modified the top of ImageSearch like this: 

Global $iDLL = DllOpen(@ScriptDir & "\ImageSearch\ImageSearchDLL32.dll")
If $iDLL = -1 Then
    ConsoleWrite("Error opening dll" & @CRLF)
EndIf

Func _ImageSearch($findImage,$resultPosition, ByRef $x, ByRef $y,$tolerance, $HBMP=0)
   return _ImageSearchArea($findImage,$resultPosition,0,0,@DesktopWidth,@DesktopHeight,$x,$y,$tolerance,$HBMP)
EndFunc

Func _ImageSearchArea($findImage,$resultPosition,$x1,$y1,$right,$bottom, ByRef $x, ByRef $y, $tolerance,$HBMP=0)
    ;MsgBox(0,"asd","" & $x1 & " " & $y1 & " " & $right & " " & $bottom)
    if $tolerance>0 then $findImage = "*" & $tolerance & " " & $findImage
If IsString($findImage) Then
    $result = DllCall($iDLL,"string","ImageSearch","int",$x1,"int",$y1,"int",$right,"int",$bottom,"str",$findImage,"ptr",$HBMP)
Else
    $result = DllCall($iDLL,"string","ImageSearch","int",$x1,"int",$y1,"int",$right,"int",$bottom,"ptr",$findImage,"ptr",$HBMP)
EndIf

i have the console write "Call image search" and then crash

 

Thanks

Share this post


Link to post
Share on other sites

#8 ·  Posted

30 minutes ago, sparky said:

search something doesn't matter what.

Seriously?  With the slim chance this is really the case you are still testing with something so again you haven't given us anything togo on to be able to assist you.
When you really want help you either provide the appropriate and sufficient information or else please done waste our space and time.

ps. the posted script portions are not runable either so post something that runs!

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#9 ·  Posted

57 minutes ago, Jos said:

search something doesn't matter what.

I am just starting using AutoIt so why is so wired cuz i just want to find an image????

You advice me like a badass developper who know all the things but i think you didn't see i just arrived here.

If you don't want to help people why you answer at my post?? To demonstrate me that you are better than me or what?

1 hour ago, Jos said:

When you really want help you either provide the appropriate and sufficient information

I am just starting how do i know what is the appropriate information???

 

1 hour ago, Jos said:

please done waste our space and time

if you respond to the post you are wasting your time the space ins on the forum is here for this

1 hour ago, Jos said:

ps. the posted script portions are not runable either so post something that runs!

why on my machine it runs???

you need this :

 

Share this post


Link to post
Share on other sites

#10 ·  Posted

5 minutes ago, sparky said:

why on my machine it runs???

For starters the second piece of code is missing an EndFunc so has a syntax error.
Install the Full SciTE4AutoIt3 installer to ensure you also check your code with au3check each time.
 

As to the rest: I think I have been pretty clear about it all so am done here until things become much clearer.

Jos

 


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

#11 ·  Posted

2 hours ago, sparky said:

and i modified the top of ImageSearch like this: 

That means is not the all script is the top of it.........of course you can't run it.......

Have you already use ImageSearch with autoit?

Check this:

you will understand of what i am talking about.

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