It is a simple and flexible simulation library in Python that performs human-like mouse movements.
Project description
MouseSim
🎯 MouseSim, insan benzeri fare hareketlerini Python ile gerçekleştiren basit ve esnek bir simülasyon kütüphanesidir. Fare hareketlerine rastgelelik (noise), hızlanma/yavaşlama (easing), sapmalar ve tıklama işlevleri ekleyerek doğal görünen etkileşimler sağlar. / It is a simple and flexible simulation library in Python that performs human-like mouse movements. It adds randomness (noise), acceleration/deceleration (easing), deviations, and clicking functions to mouse movements to create natural-looking interactions.
🧠 Özellikler / Features
Türkçe
- Hedefe doğrusal olmayan, insan benzeri fare hareketleri
- Easing (hızlanma ve yavaşlama) efektleri
- Ufak rastgele sapmalar (noise) — insansı efektler
- Hem sol hem sağ tıklama desteği
- Delay (gecikme) kontrolü
- Kütüphane içinde rahat kullanım için nesne yönelimli (OOP) yapı
English
- Human-like mouse movement toward a target
- Easing effects for acceleration and deceleration
- Subtle randomness (noise) to simulate human error
- Left and right click support
- Control over delay and movement speed
- Object-oriented structure for clean integration
📦 Kurulum / Installation
PyPI’ye yüklendiğinde:
pip install MouseSim
🧪 Kullanım Örnekleri / Usage Examples
from MouseSim import *
import time, random, math
# MouseSim objesini oluşturun / Create a MouseSim instance
ms = MouseSim(noise_range=3, base_delay=0.01)
# 1. Move the cursor / İmleci Hareket Ettirme
# Türkçe: İmleci (500, 300) koordinatlarına yumuşakça taşı
# English: Move the cursor to (500, 300) smoothly
ms.move(500, 300, steps=120)
# 2. Single Click / Tek Tıklama
# Türkçe: Mevcut imleç konumunda sol tıklama yap
# English: Perform a left click at current cursor position
ms.left_click()
# 3. Double Click / Çift Tıklama
# Türkçe: 0.2 saniye aralıkla çift tıklama yap
# English: Perform a double click with 0.2 seconds interval
ms.double_click(interval=0.2)
# 4. Right Click / Sağ Tıklama
# Türkçe: Sağ tıklama yap
# English: Perform a right click
ms.right_click()
# 5. Middle Click / Orta Tıklama
# Türkçe: Orta (tekerlek) tıklaması yap
# English: Perform a middle (wheel) click
ms.middle_click()
# 6. Click and Hold / Tıklayıp Basılı Tutma
# Türkçe: Sol fare tuşuna basılı tut
# English: Press and hold the left mouse button
ms.left_click_and_hold()
# English: Release the left mouse button
# Türkçe: Sol fare tuşunu bırak
ms.left_release_click()
# 7. Scroll / Kaydırma
# Türkçe: Kaydırma yap, pozitif yukarı, negatif aşağı
# English: Scroll up or down, positive for up, negative for down
ms.scroll(amount=120) # Scroll up
ms.scroll(amount=-120) # Scroll down
# 8. Drag and Drop / Sürükle ve Bırak
# Türkçe: (100, 200) noktasından (400, 500) noktasına sürükle ve bırak
# English: Drag from (100, 200) to (400, 500)
ms.drag_and_drop(100, 200, 400, 500, steps=150)
📚 Parametreler Açıklaması / Parameters Explained
duration: float
- Fare hareketinin kaç saniyede tamamlanacağını belirler.
- Varsayılan:
1.0saniye
noise_range: int
- Her adımda koordinata eklenen rastgele ± değer.
- Örnek:
noise_range=2⇒ her adımda-2ile+2arasında sapma olur. - İnsan elinin hassasiyetini taklit eder.
easing: bool
- True olarak ayarlanırsa fare hareketi başta yavaş, ortada hızlı, sonda tekrar yavaş olur.
- Daha doğal bir hareket görünümü sağlar.
🖱️ "Notch" nedir?
Notch, fare hareketinde kullanılan küçük adımlardır. Örneğin:
- 1 "notch" = 1 piksel'lik hareket anlamına gelir.
- Kod içinde, fare her "notch"’ta bir konum değiştirir.
- Çok küçük değerler fareyi yavaş ve hassas, büyük değerler hızlı yapar.
📄 Lisans / License
MIT License. Tüm hakları saklıdır.
🧑💻 Geliştirici / Developer
Kemal Sayıt
📍 Türkiye
🔗 [https://www.linkedin.com/in/kemal-sayit/]
🇹🇷 Açıklama Notu
Bu kütüphane, bot programlamaları, otomasyon testlerindeki robot tespitini zorlaştırmak ve masaüstü etkileşimleri için kullanılabilir. Lütfen etik dışı alanlarda kullanmaktan kaçının.
🇬🇧 Disclaimer
This library can be used for bot programming, making automation tests harder to detect as robots, and for desktop interaction simulations. Please avoid using it in unethical contexts.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mousesim-1.0.0.tar.gz.
File metadata
- Download URL: mousesim-1.0.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4db78854e7c88affe840e396fd9a67dcd64407df14b33b312f79f8fde3d4276d
|
|
| MD5 |
c6135dbe1acac274e5e029befec3ff87
|
|
| BLAKE2b-256 |
34a5d4b84fbd35fa62c033048f987f1051589af5bab0a6012982987179f8de62
|
File details
Details for the file mousesim-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mousesim-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d57fcdb7de1389ded7991ae181543c76b3551b7f400de749bc58c9c8e7d5e70
|
|
| MD5 |
82e28e57e0e8b6460c1db2f1412aadc5
|
|
| BLAKE2b-256 |
9fb263c6a6ce428585384899ced7b42acbd52e14bc65e73027e5027ca909f108
|