Jump to content

Search the Community

Showing results for tags 'imagesearchex.au3'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. this is a UDF to make image search on inactive window, but not minimized. using it, you can seach for coords of an image so that you can use ControlClick to click on it in Background while you are watching a movie or doing something else on the screen. i am not who made this UDF . i only fixed some bugs on it : it wasn't able to run on 64 bit : so i added #AutoIt3Wrapper_UseX64=NO it looked for the top left of the image : so i made it find the height \ 2 and the width \ 2 of the image and add them to the Coords so the Coords will be at the middle of the image ... here is the UDF : imageSearchEX.au3 BmpSearch.au3 here is an example : #AutoIt3Wrapper_UseX64=NO ;because ImageSearchEX doesn't run on 64 bit #include <imageSearchEX.au3> $imageSearchEX = imageSearchEX ; this is to make it easy to write the name of the func ^_^ $Win = "..." ;the name or class of requested window $Image = "..." ;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 $_$.... ;you can use snipping tool .exe to capture it and use paint .exe to save it as 24-bit Bitmap $p= $imageSearchEX($Win,$Image) if $p=0 Then ; what to do if image was not exists MsgBox(0,"","Image Doesn't exist") EndIf _ArrayDisplay($p) ; you can delete this line >> as it only shows you the Coords of the image on the window ControlClick($Win,"leave it blank","the control you want to click","primary ...or the button you want to click","Number of clicks",$p[0],$p[1]) #cs ;If you want to test it on the screen using MouseClick or Mouse move ...etc $WinSize= WinGetPos("(Frozen) AutoIt v3 Window Info") MouseMove($p[0] + $WinSize[0],$p[1] + $WinSize[1],1) #ce and here are some functions to make it easy to use this UDF : #AutoIt3Wrapper_UseX64=NO #include <imageSearchEX.au3> Global $imageSearchEX = imageSearchEX Global $FAC = FindAndClick Global $WUA = WaitUntilAppear Global $WUATC = WaitUntilAppearThenClick Func FindAndClick($Window,$Image,$Control) ;~ This function is to find an image that is surely on the window when this function is called $coords = $imageSearchEX($Window,$Image) ControlClick($Window,"",$Control,"primary",1,$coords[0],$coords[1]) EndFunc Func WaitUntilAppear($Window,$Image,$Control) ;~ This function is to pause the script until an image is found on the window While 1 $coords = $imageSearchEX($Window,$Image) If Not $coords = 0 Then ExitLoop Sleep(50) WEnd EndFunc Func WaitUntilAppearThenClick($Window,$Image,$Control) ;~ This function is to pause the script until an image is found on the window then click on that image While 1 $coords = $imageSearchEX($Window,$Image) If Not $coords = 0 Then ControlClick($Window,"",$Control,"primary",1,$coords[0],$coords[1]) ExitLoop EndIf Sleep(50) WEnd EndFunc GAMERS - Asking for help with ANY kind of game automation is against the forum rules. DON'T DO IT. Sorry for bad English
×
×
  • Create New...