XJoeyV Posted May 22, 2017 Share Posted May 22, 2017 Hi, I want to know if this is possible to make with AutoIT to get a picture from my computre and compare that to a certain area around the mouse. Sor for example I get a bitmap with a picutre and when the mouse moves I check if the mouse position and like around it for 20px looks like the picture and if so I do action X Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted May 22, 2017 Moderators Share Posted May 22, 2017 Moved to the appropriate forum, as the Dev Forum very clearly states: Quote Do not create AutoIt-related topics here, use the AutoIt General Help and Support Also, a short answer would be yes. A slightly longer answer would be "How about a detailed description regarding what you are trying to accomplish"? "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...
XJoeyV Posted May 30, 2017 Author Share Posted May 30, 2017 On 2017-5-22 at 10:32 PM, JLogan3o13 said: Moved to the appropriate forum, as the Dev Forum very clearly states: Also, a short answer would be yes. A slightly longer answer would be "How about a detailed description regarding what you are trying to accomplish"? Sorry I lost my account and there where some things going on. But to be more detailed. When I move the mouse I want to get a area around the mouse for example this: http://prntscr.com/fdyy5v *Red Dot ( Between the text ) = The mouse pointer * Red Marked Area = The area around the mouse I want to get ( in fact it would be smaller ) That area is the area I want to compare to a image for example this: http://prntscr.com/fdyysr And then see how similar they are, if they are similar for like 80% then we go with Code X if not nothing will happen. This is a bit of the idea how it see it. FUNCTION onmousemove image i IS area around pointer iamge pc IS the image on the machine IF i is equal to pc OR i is 80% equal to pc THEN LOG "Hellow Image" ELSE ... ENDFUNCTION Link to comment Share on other sites More sharing options...
anthonyjr2 Posted May 30, 2017 Share Posted May 30, 2017 (edited) You should be able to use the ImageSearch library here I would think the best way to go about it is to get the position of your mouse, and then search in a predefined area around it. For example: $mouseX = MouseGetPos(0) $mouseY = MouseGetPos(1) Local $search = _ImageSearchArea('image.bmp', 1, $mouseX, $mouseY, 50, 50, $x, $y, 0) If($search) Then ;do stuff you want Else ;we didnt find it EndIf I haven't tested this because I don't have the dlls set up for ImageSearch anymore, but some playing around with the area parameters of ImageSearch should work. Edited May 30, 2017 by anthonyjr2 UHJvZmVzc2lvbmFsIENvbXB1dGVyZXI= Link to comment Share on other sites More sharing options...
junkew Posted May 31, 2017 Share Posted May 31, 2017 This gives you some indication(s) on sourcecode that can help FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets 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