Jump to content

Recommended Posts

Posted

Hi ,

I was trying to use image search function on specific window in this case it is google chrome 

but image search area isnt working it still searches the image with respect to desktop screen not with respect to google chrome window  

here is my code 

#include <ImageSearch.au3>
#include <MsgBoxConstants.au3>
Opt("CaretCoordMode", 2)
Opt("MouseCoordMode", 2)
HotKeySet("p", "checkForImage")
HotKeySet("q", "closei")
global $y = 0, $x = 0

Func checkForImage()
    WinActivate("[CLASS:Chrome_WidgetWin_1]","")
    Sleep(500)
local $search = _ImageSearchArea('D:\autoit progs\on1.bmp',1,490,177,610,227,$x,$y ,80)
If $search = 1 Then
MouseMove(537, 197, 10)
MsgBox($MB_SYSTEMMODAL ,"Image", "Found")
Else
MsgBox($MB_SYSTEMMODAL , "Image" ,"Not Found")

EndIf
EndFunc
Func closei()
    Exit
EndFunc

while 1
sleep(200)
WEnd

Help is appreciated :)

Posted
1 hour ago, Jos said:

How is this thread/question different from the one that was closed previously being against our forum rules?

Jos

 

What rules did i violated  now   ? 

I am not making any scripts for automation in google chrome I am just testing image search whether it works on seperate window or not

google chrome is just an example 

this script posted above is made only for testing image search while testing i encountered this problem

I am not DOING any  EULA violation with this script

  • Developers
Posted
3 hours ago, ashbeast said:

I am not DOING any  EULA violation with this script

First off: Please slow down a little as that will not help other than make us less patient with you.

We have some verbiage in our rules not to open a similar topic when one was closed and this could be considered as a re-wording of the closed one, so please don't play innocent with me and ensure you stick to our rules!

Make sure you breath at least 3 before replying in a "cry wolf" or any other inappropriate manner as that will not be accepted. ;) 

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.
  :)

  • 2 weeks later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...