tyraelcb Posted January 9, 2014 Posted January 9, 2014 First off, I'm brand new to AutoIT and this forum. Love the program so far and look forward to learning how to use it more. I tried searching for the solution to my problem but I couldn't find one, so hoping someone can help. I'm trying to use ImageSearch. It seems to be working fine except for one part which might be by design so that's what I'm trying to find out. I can't get _ImageSearchArea to use window coordinates. It only seems to work with the entire screen coordinates. ImageSearch works fine. _ImageSearchArea using screen coordinates works fine _ImageSearchArea using window coordinates still searches the entire screen. I tried using PixelCoordMode, 0 and MouseCoordMode, 0 but that didn't help. Anyone else have this issue? Is this how it should be behaving?
l3ill Posted January 9, 2014 Posted January 9, 2014 Hi tyraelcb, and welcome to the forum! To help you with your problem we will need to see what you have so far on code or a reproducer of the issue. Bill My Contributions... SnippetBrowser NewSciTE PathFinder Text File Manipulation FTP Connection Tester / INI File - Read, Write, Save & Load Example
Solution Kidney Posted January 9, 2014 Solution Posted January 9, 2014 $aResult = WinGetPos("Window Title") ;$aResult[0] = Left ;$aResult[1] = Top ;$aResult[2] = Width ;$aResult[3] = Height _ImageSearchArea("TestImage.png", 0, $ReturnedX, $ReturnedY, ($aResult[0] + $aResult[2]), ($aResult[1] + $aResult[3]), $aResult[0], $aResult[1], 100) ;Make sure that the "right" and "bottom" parameters are larger than the "x" and "y". ;Also check to make sure you are adding the Top and Height together as well as Left and Width from the WinGetPos MouseMove($ReturnedX, $ReturnedY, 0)
tyraelcb Posted January 9, 2014 Author Posted January 9, 2014 Thanks Kidney, that is exactly what I was looking for!
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