Skip to main content

Neural network based humanized mouse movements

Project description

nn-mouse

Neural network based humanized mouse movements. The models in this projects are from https://github.com/DaiCapra/Natural-Mouse-Movements-Neural-Networks

Demo

Demo

Installation

You can install the package via pip:

pip install nn-mouse mouse

Note: Any mouse module that can parse the current location of the mouse and move the mouse can be used. In this example, https://github.com/boppreh/mouse is used.

Usage

import time

import mouse

from nn_mouse import get_path

# monitor size
w, h = 1920, 1080

# current location
x, y = mouse.get_position()

# destination location
x1, y1 = 435, 578

# get the path of the movement
path = get_path(x, y, x1, y1, w, h)
# [
#     (614.0211354717612, 247.95467158179963, 7.2918200492858884e-06),
#     (605.374471783638, 262.2269676923752, 0.0002616463661193848),
#     (605.2463676929474, 262.5907788351178, 0.00032121673583984374),
#     (605.0176306962967, 263.15670113265514, 0.00036980979919433595),
#     (604.8388337492943, 264.25625159591436, 0.0004095515823364258),
#     ...
# ]

# move the mouse based on the path
for x, y, t in path:
    mouse.move(x, y)
    time.sleep(t)

License

This project is licensed under the terms of the MIT license.

Project details


Download files

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

Source Distribution

nn_mouse-1.0.0.tar.gz (843.4 kB view details)

Uploaded Source

Built Distribution

nn_mouse-1.0.0-py3-none-any.whl (841.3 kB view details)

Uploaded Python 3

File details

Details for the file nn_mouse-1.0.0.tar.gz.

File metadata

  • Download URL: nn_mouse-1.0.0.tar.gz
  • Upload date:
  • Size: 843.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for nn_mouse-1.0.0.tar.gz
Algorithm Hash digest
SHA256 61af0ae495f37f67365d4fe818e7030b68556bf5dd7911560bfeef9c21d6774a
MD5 eb01817a1f884540aecb34172062e50d
BLAKE2b-256 c266e6bc2ff5ca0324a7543547db1d889cf392a3516829d7da8b74babf6329ef

See more details on using hashes here.

File details

Details for the file nn_mouse-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: nn_mouse-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 841.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for nn_mouse-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c8a0e19e6cfdbe52710d9b95b18b19af2611d5785c01cc88115c5f1b3e39ba5
MD5 fba2f64355359e62c2dc0b37fa195be0
BLAKE2b-256 1d9c1e20fda084029f39e8ab24172194844f207f7a3e34a6bd8cc7b8bcb2ae7b

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