Skip to main content

auto control gui

Project description

je_auto_control

install

pip install je_auto_control

Info

  • Python & pip require version

    • Python 3.5 & up
    • pip 19.3 & up
  • Dev env

    • windows 11
    • osx 11 big sur
    • ubuntu 20.0.4
  • Test on

    • windows 10 ~ 11
    • osx 10.5 ~ 11 big sur
    • ubuntu 20.0.4
  • Notice

    • if you want to run image test then change default image path to your image path
    • if you are using XWindows os ,like ubuntu you may need to update pillow

TODO

  • more feature

example

  • All test and example in test dir

how to use

keyboard type

import time

from je_auto_control import type
from je_auto_control import keys_table

"""
check keys
"""
print(keys_table.keys())

"""
Linux in every type and press then release need stop 0.01 time in my computer,i'm not sure it's right?

example:
    type("T")
    time.sleep(0.01)
    type("E")
    time.sleep(0.01)
    type("S")
    time.sleep(0.01)
    type("T")
    time.sleep(0.01)

or:
    press_key("T")
    release_key("T")
    time.sleep(0.01)
"""

type("T")
type("E")
type("S")
type("T")

keyboard key is press

import sys

from je_auto_control import check_key_is_press

# because os key_code not equal
while True:
    # linux key backspace
    if sys.platform in ["linux", "linux2"]:
        if check_key_is_press(22):
            sys.exit(0)
    # osx key F5
    if sys.platform in ["darwin"]:
        if check_key_is_press(0x60):
            sys.exit(0)
    # windows key a or you can use check_key_is_press(ord("A"))
    if sys.platform in ["win32", "cygwin", "msys"]:
        if check_key_is_press("A"):
            sys.exit(0)

mouse

import time

from je_auto_control import position
from je_auto_control import set_position
from je_auto_control import press_mouse
from je_auto_control import release_mouse
from je_auto_control import click_mouse
from je_auto_control import mouse_table

time.sleep(1)

print(position())
set_position(809, 388)

print(mouse_table.keys())

press_mouse("mouse_right")
release_mouse("mouse_right")
press_mouse("mouse_left")
release_mouse("mouse_left")
click_mouse("mouse_left")

scroll

from je_auto_control import scroll

scroll(100)

screen

from je_auto_control import size

print(size())

locate image

import time

from je_auto_control import locate_image_center

time.sleep(2)
# detect_threshold 0~1 , 1 is absolute equal
image_data = locate_image_center("../../../test_template.png", detect_threshold=0.9, draw_image=False)
print(image_data)

locate all image

import time

from je_auto_control import locate_all_image

time.sleep(2)
# detect_threshold 0~1 , 1 is absolute equal
image_data = locate_all_image("../../../test_template.png", detect_threshold=0.9, draw_image=False)
print(image_data)

locate and click image in center

import time

from je_auto_control import locate_and_click

time.sleep(2)
# detect_threshold 0~1 , 1 is absolute equal
image_data = locate_and_click("../../../test_template.png", "mouse_left", detect_threshold=0.9,
                              draw_image=False)
print(image_data)

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

je_auto_control-0.0.27.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

je_auto_control-0.0.27-py3-none-any.whl (33.5 kB view details)

Uploaded Python 3

File details

Details for the file je_auto_control-0.0.27.tar.gz.

File metadata

  • Download URL: je_auto_control-0.0.27.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.7

File hashes

Hashes for je_auto_control-0.0.27.tar.gz
Algorithm Hash digest
SHA256 6f8276767a9141d9689dbb9d8711218ee850c7c12e1088abb1ea9640b13f247b
MD5 0dca105a6961d980833deb12ef533e12
BLAKE2b-256 867c842f5a0b62ddd47e5fc37069fe46a33f1bd80ec85e9f2c3d2b8562de06a1

See more details on using hashes here.

File details

Details for the file je_auto_control-0.0.27-py3-none-any.whl.

File metadata

  • Download URL: je_auto_control-0.0.27-py3-none-any.whl
  • Upload date:
  • Size: 33.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.7.7

File hashes

Hashes for je_auto_control-0.0.27-py3-none-any.whl
Algorithm Hash digest
SHA256 fd5ccc43c77296886c687c7f96e03ca71dfa941546b6775dfefb4898dcdc4f88
MD5 2c313b8ddd94bed8acb9c838cf6dd5d9
BLAKE2b-256 4c69c28a388174c2a0b1a75eeb4482a9671b423aa2250f208592c343016ff2d9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page