sparky Posted March 11, 2017 Posted March 11, 2017 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
Developers Jos Posted March 12, 2017 Developers Posted March 12, 2017 Is there a question it there or you just wanted to share having issues? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
sparky Posted March 12, 2017 Author Posted March 12, 2017 I have problems. The script doesn't search anything. When i try to search an image with _ImageSearch function my program carsh.
Developers Jos Posted March 12, 2017 Developers Posted March 12, 2017 .. 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. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
sparky Posted March 12, 2017 Author Posted March 12, 2017 What can i say more? Or what are relevant informations for you?
Developers Jos Posted March 12, 2017 Developers Posted March 12, 2017 Come on... Ok let 's start simple: What are you trying to automate? (Which application/Use case) Show the script you have that doesn't work. What have you tried? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
sparky Posted March 12, 2017 Author Posted March 12, 2017 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
Developers Jos Posted March 12, 2017 Developers Posted March 12, 2017 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 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
sparky Posted March 12, 2017 Author Posted March 12, 2017 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 :
Developers Jos Posted March 12, 2017 Developers Posted March 12, 2017 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 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
sparky Posted March 12, 2017 Author Posted March 12, 2017 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.
sparky Posted March 12, 2017 Author Posted March 12, 2017 I resolved the problem using https://github.com/zd-zero/AutoIt-Scripts/tree/master/ImageSearch2015
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now