Skip to main content

A library able to control mouse for auto-clicking

Project description

clickpy

A library able to control mouse (mainly for auto-clicking)

Installation

[!WARNING] The package will be installed on non-Windows platforms with no errors.

This is for automation purposes only, as the package will only work on Windows.

From PyPI

pip3 install clickpy

From GitHub

pip3 install git+https://github.com/donno2048/clickpy

Usage

Here's the method listing for the package.

  • get_cursor_pos: Can be used to determine the position to feed click_at or clicks_at.

Example usage:

from clickpy import get_cursor_pos
get_cursor_pos()
  • click_here: The method will create a click at the current location

Example usage:

from clickpy import click_here
click_here()
  • click_at: The method will create a click at the specified (x,y) coordinates

Example usage:

from clickpy import click_at
click_at((0,0))
  • clicks_here: The method will create a certain amount of click at the current location The method has a number of optional keyword arguments:
    • ms_delay - the delay in milliseconds between the clicks [default: at fast as the OS allows]
    • total_clicks - the total clicks to be sent [default: infinitely many]
    • key_stop - a virtual key code that when entered in the keyboard the clicks will stop at once - e.g. ord('a'.upper()) to stop on a key press [default: stop only after total_clicks clicks]
    • key_start - similar to key_stop but for starting the clicks [default: start immediately]
    • stop_modifier - the modifier (e.g. ALT, CONTROL, SHIFT and WIN) for key_stop
    • start_modifier - the modifier for key_start

Example usage:

from clickpy import clicks_here, SHIFT, ALT
# will start clicking at the cursor's position one million times with 10ms delay in between when 0 is pressed and stop upon SHIFT+ALT+0
clicks_here(ms_delay=10, total_clicks=1_000_000, key_stop=ord('0'), key_start=ord('0'), stop_modifier=SHIFT|ALT)
  • clicks_at: The method will create a certain amount of clicks at the specified location The method expects the same (optional) keyword arguments as clicks_here but also a (x,y) coordinates tuple which can be provided as a positional argument or as the position keyword

Example usage:

from clickpy import clicks_at, get_cursor_pos, SHIFT, ALT
# same as the clicks_here example but at the initial position of the cursor
clicks_at(get_cursor_pos(), ms_delay=10, total_clicks=1_000_000, key_stop=ord('0'), key_start=ord('0'), stop_modifier=SHIFT|ALT)

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

clickpy-1.0.1.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file clickpy-1.0.1.tar.gz.

File metadata

  • Download URL: clickpy-1.0.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for clickpy-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3db237b3bc205afc140c8190fa98452bed7bd4c3eb6ca06b54bcef5f60730657
MD5 8b11fe16c673eba7d02cc50635bcab6d
BLAKE2b-256 621fdbda4fa29848751ffb6d9a2d3c92be67d2b6cb6b507abfd17e9ff872feef

See more details on using hashes here.

Provenance

The following attestation bundles were made for clickpy-1.0.1.tar.gz:

Publisher: python-publish.yml on donno2048/clickpy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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