SHARE
TWEET

Untitled

YuJa Apr 7th, 2019 261 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #AutoIt3Wrapper_UseX64=NO ;because ImageSearchEX doesn't run on 64 bit
  2. #include <imageSearchEX.au3>
  3. $imageSearchEX = imageSearchEX ; this is to make it easy to write the name of the func ^_^
  4.  
  5. $Win = "BlueStacks App Player" ;the name or class of requested window
  6. $Image = "GuardianBtn.png" ;the path to the image you want to look for > it must be 24-bit Bitmap....and remember the more the image is small the faster you find it $_$....
  7. ;you can use snipping tool .exe to capture it and use paint .exe to save it as 24-bit Bitmap
  8.  
  9. $p= $imageSearchEX($Win,$Image)
  10.  
  11. if $p=0 Then ; what to do if image was not exists
  12.    MsgBox(0,"","Image Doesn't exist")
  13.    EndIf
  14. ;_ArrayDisplay($p) ; you can delete this line >> as it only shows you the Coords of the image on the window
  15. ;ControlClick($Win,"","","primary",2,$p[0],$p[1])
  16. MouseMove($p[0]+23,$p[1]+43)
  17.  
  18. #cs
  19.  
  20. ;If you want to test it on the screen using MouseClick or Mouse move ...etc
  21.  
  22. $WinSize= WinGetPos("(Frozen) AutoIt v3 Window Info")
  23.  
  24. MouseMove($p[0] + $WinSize[0],$p[1] + $WinSize[1],1)
  25.  
  26. #ce
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top