Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

A small python library use to Searchs for an image on the screen

Project description

screen_search is small python library use to Searchs for an image on the screen

install:

to install the library type in your Terminal

pip install screen_search

requirements

screen_search supports Python 2 and 3. If you are installing screen_search from PyPI using pip: Windows has no dependencies. The Win32 extensions do not need to be installed. OS X needs the pyobjc-core and pyobjc module installed (in that order). Linux needs the python3-xlib (or python-xlib for Python 2) module installed. Pillow needs to be installed, and on Linux you may need to install additional libraries to make sure Pillow's PNG/JPEG works correctly.

Example

this is simple example of looking for a picture on the screen and moving the pointer to it.

from screen_search import *

# Search for the github logo on the whole screen
# note that the search only works on your primary screen.
search = Search("github.png")


pos = search.imagesearch()

if pos[0] != -1:
    print("position : ", pos[0], pos[1])
    pyautogui.moveTo(pos[0], pos[1])
else:
    print("image not found")

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for screen-search, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size screen_search-1.0-py3-none-any.whl (15.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size screen_search-1.0.tar.gz (15.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page