Turranius Posted January 29, 2020 Share Posted January 29, 2020 (edited) Heya. I tried the imagesearch from here: It works just fine on my workstations. As soon as I load it in vmware workstation on a Win10 x64 machine (same as my desktops) it just stops working with a "! Dll not found or Call Dll error !" error. If I put an consolewrite on @error after the dllcall, I get a "1" which according to the dllcall description means "Unable to use the dll file". I fiddled with it for a bit with the same result every time. Tried both x64 and x86 version (compiled script accordingly) but the same thing. Tried #RequireAdmin and the usual tricks. Had the dlls both in @Temp and in @ScriptDir etc... Finally I thought I must be doing something wrong, so I followed the video on the download page to the letter, using the example script. It works fine on my desktops but it fails to find any image on my vmware machines. Scaling is set to 100 and all the other tips I could find.. Any clues? Why would it fail every time on a virtual vmware machine? Surely something with the dlls? WMware Workstation 15 Pro version 15.1.0 Build 13591040 Not posting an example here since the example that comes with the script shows the same result. Thanks! Edited January 29, 2020 by Turranius Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 29, 2020 Moderators Share Posted January 29, 2020 Since you're not posting an example, can you at least help us to understand what you're trying to accomplish, instead of making us guess? ImageSearch covers a wide range of uses (99% of which can be done better with a different function), so it is just a bit difficult suggesting options when we don't know what your end goal is. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Bert Posted January 30, 2020 Share Posted January 30, 2020 It may be the dll isn't on the VMWare image you loaded or is loaded but the path to it isn't set in the registry. You could put the DLL in question in the same folder as your script that is on the VMWare image then in your script set the path to the DLL so that it points to it. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Turranius Posted January 30, 2020 Author Share Posted January 30, 2020 (edited) 16 hours ago, JLogan3o13 said: Since you're not posting an example, can you at least help us to understand what you're trying to accomplish, instead of making us guess? ImageSearch covers a wide range of uses (99% of which can be done better with a different function), so it is just a bit difficult suggesting options when we don't know what your end goal is. The example is the example script in the downloadable package. To detect if a picture is on screen and if so, where. That is all the example does. Just open the example and run it according to the linked video in the download page for it that shows how its working. Do exactly that and that is all I'm trying to accomplish 😃 It felt a bit silly to post the example script that is included, unmodified, in the download package 😃 If you are asking if I'm trying to use this to automate gaming, no. We have screenscraping programs at work that reads texts from a mainfraime and I'm trying to write a better program for them since its old and slow as heck. I already have OCR set to up actually read whats on screens but there are a number of icons and logos that I need to determine if they are on screen or not to see which section of the mainframe they are in.. Figured ImageSearch was a good idea and it is since it works and is a LOT faster. As soon as I move it over to the virtual machines that runs these things automatically though, it stops working. Edited January 30, 2020 by Turranius Link to comment Share on other sites More sharing options...
Turranius Posted January 30, 2020 Author Share Posted January 30, 2020 (edited) 1 hour ago, Bert said: It may be the dll isn't on the VMWare image you loaded or is loaded but the path to it isn't set in the registry. You could put the DLL in question in the same folder as your script that is on the VMWare image then in your script set the path to the DLL so that it points to it. The dll is there on the virtual machine as I wrote in the initial post. "Had the dlls both in @Temp and in @ScriptDir etc... " means both on the desktops it works on and on the VMWare machines. Those are the two locations its trying to DllCall it from the included _ImageSearch.au3 file. It is not a dll that needs, or even can be, registered. So not that simple I'm afraid.. =( I would really appreciate it if someone who has a Win10 x64 VMWare machine could download the package and try the example in it and see if you get the same result (as in no result). Edited January 30, 2020 by Turranius Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 30, 2020 Moderators Share Posted January 30, 2020 3 hours ago, Turranius said: If you are asking if I'm trying to use this to automate gaming, no. I was not, but always good to hear Does a simple FileExist call inside the VM, pointed at the dll, work? "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Earthshine Posted January 30, 2020 Share Posted January 30, 2020 (edited) Perhaps the DLLs that you’re using that are present depend upon some other DLLs Edited January 30, 2020 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Trong Posted January 31, 2020 Share Posted January 31, 2020 I have recompiled the dll and updated the source code. Tried in VMW and it worked fine. Please download the updated version. Turranius 1 Regards, Link to comment Share on other sites More sharing options...
Bert Posted January 31, 2020 Share Posted January 31, 2020 You know - I wonder if memory reading would work here. (I'm surprised I'm even saying this) nomad.au3 is the file if I remember right. My thinking is if you read the memory, the it make no difference on screen scraping. In the past when I did screen scraping I found it very unstable. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Turranius Posted February 1, 2020 Author Share Posted February 1, 2020 (edited) On 1/31/2020 at 8:20 AM, VIP said: I have recompiled the dll and updated the source code. Tried in VMW and it worked fine. Please download the updated version. Thank you! Gave the example a try on 2 desktops first, all tests works fine. Tested on VMware machine and the results are .. inconclusive. Sometimes it finds one or the other. Sometimes it finds both. Usually it only finds one picture on the first test but the next, where it moves to mouse to it, it only manages to find the other. Seems a bit 50/50 if it finds it. I'm just grabbing 2 different desktop icons as well, as the example suggests, no nothing complex 😃 Example when only Seach_2.bmp is found. This is the MOST common result by far. Seach_2.bmp is almost always found on the first example: --\\ ImageSearch by TRONG.LIVE //-- OSArch : X64 // AutoIT ver: 3.3.14.5 X64 -- WorkingDir : C:\Test -- ScriptFullPath : C:\Test\_ImageSearch_Example.au3 -- ImageSearchDLL : C:\Test\_ImageSearch_DLL\_ImageSearch_x64.dll (18.5kb) -- ScreenCapture : X1=17 Y1=200 X2=72 Y2=249 -- ScreenCapture : X1=13 Y1=299 X2=64 Y2=337 ! Search not found ! + Dll Return: 1|17|200|56|50 - : 17 200 ! Search not found ! ! Search not found ! ! Search not found ! ! Search not found ! ! Search not found ! (A lot more of not found here) Another example where it finds the first 2 on the first example. When it comes time to move the mouse, it only finds one of them --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop --\\ ImageSearch by TRONG.LIVE //-- OSArch : X64 // AutoIT ver: 3.3.14.5 X64 -- WorkingDir : C:\Test -- ScriptFullPath : C:\Test\_ImageSearch_Example.au3 -- ImageSearchDLL : C:\Test\_ImageSearch_DLL\_ImageSearch_x64.dll (18.5kb) -- ScreenCapture : X1=80 Y1=820 X2=157 Y2=872 -- ScreenCapture : X1=2 Y1=246 X2=91 Y2=296 + Dll Return: 1|80|820|78|53 - CP: 119 847 + Dll Return: 1|80|820|78|53 - : 80 820 + Dll Return: 1|80|820|78|53 - CP: 119 847 ! Search not found ! ! Search not found ! ! Search not found ! ! Search not found ! ! Search not found ! I will keep trying and see if I can find a pattern why it works 50% of the time. Update: Testing it in my own script works fine though. Not sure why the _ImageSearch_Example.au3 does not. But it works for me. Big thanks! Edited February 1, 2020 by Turranius Link to comment Share on other sites More sharing options...
Turranius Posted February 1, 2020 Author Share Posted February 1, 2020 18 hours ago, Bert said: You know - I wonder if memory reading would work here. (I'm surprised I'm even saying this) nomad.au3 is the file if I remember right. My thinking is if you read the memory, the it make no difference on screen scraping. In the past when I did screen scraping I found it very unstable. Good idea. I might take a look at this if it does not pan out 😃 Link to comment Share on other sites More sharing options...
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