beelzeboul Posted May 3, 2017 Posted May 3, 2017 So I am relatively new here and I know people dont generally like writing code for someone else hopefully this request is small enough that it can be granted The end goal is to have a window that is never active but open get searched for a specific image and than take an action of either cotrol clicking a coordinate or searching another image I believe the code would look something like Loop Search image(destination of image) inside specific window (window title or handle) if that image exist then control click x y location in that specific window then search for another image if found then exit loop Else search for another image if exist then control click x y location inside specific window Loop If someone has some sort of template that I could use for this I would be eternally grateful while programming architecture and conditionals are clear concepts transferring those concepts to code has been difficult
junkew Posted May 3, 2017 Posted May 3, 2017 Search findbmp in examples section FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
beelzeboul Posted May 4, 2017 Author Posted May 4, 2017 Thanx junkew I had seen the commands for find image or search image functions the problem I was having was confinging the search to a window rather than desktop. I had seen your other post rather than necroing it or spamming I figured I would keep my query to this thread. correct me if im wrong but in order for this process to suit my needs I would need to capture an image from the window I want than search that image for specifics and than create the conditions for each being found or not. this could be how all general search functions work for all I know I was hoping for something a little more concise with my needs ie search window for image if image exist control click its location I wouldnt mind having to configure the coordinates for the controlclick ie search image if exist then click predefined location if this is not possible than this is very helpful as far as putting me on the right path Thanx again for chiming in man
beelzeboul Posted May 4, 2017 Author Posted May 4, 2017 this was the intial function I was looking at but the limitations of not being able to define a window to search was what I was hoping to work around
beelzeboul Posted May 4, 2017 Author Posted May 4, 2017 this was kinda a breakdown it looks like he is using the method your illustrating so It would seem you were exactly right junkew I appreciate the help of getting me on track here
junkew Posted May 18, 2017 Posted May 18, 2017 if you read the findbmp examples you will see winactivate($calcHWND);Make sure calculator is active on the screen findTester("[ACTIVE]",$Bitmap3Filename,$c24RGBFullMatch);Find the backspace button so there are out of the box functions to deal with 1. desktop 2. active window 3. doing it from filesystem with files of type .bmp, .jpg, .gif (all types as supported by GDI) And I will put on my list to validate how well findbmp still works in 2017 with latest version of AutoIt FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
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