GithubHelp home page GithubHelp logo

mrtanoshii / rusty-autoclicker Goto Github PK

View Code? Open in Web Editor NEW
69.0 3.0 11.0 3.61 MB

A pure Rust portable auto clicker built for Linux, macOS & Windows.

License: Creative Commons Zero v1.0 Universal

Rust 100.00%
rust autoclicker idle-clicker-game cc0-license utility hacktoberfest

rusty-autoclicker's Introduction

Rusty AutoClicker

Latest Version CC0-1.0 License Rust Check Linux Build macOS Build Windows Build

Table of Content

Screenshots 🔝

Main Interface

Hotkey Change

Setting Coordinates

Features & Roadmap 🔝

Features that currently are or will be implemented.

  • Built in Rust
  • Cross-compatible with Linux, macOS and Windows
  • Free and Open Source Software
  • Bot Mode
  • Humanlike Mode
    • Tweening when moving to desired click position
    • Randomizing time between clicks
    • Randomizing click duration
    • Random mouse movement between clicks (if click interval permits)
    • Setting for min/max move speed
  • Mouse & Preset Coordinates Mode
  • Infinite & fixed click amount
  • Left/Middle/Right mouse clicks
  • Single/Double mouse clicks
  • User customizable hotkeys
  • Data persistence (e.g. Custom hotkeys, coordinates)
  • Options (e.g. Display mouse & key info)

Advanced features

These features are being considered but are not confirmed.

  • Click sequence
  • Profiles (e.g. Profile for a specific app/game)
  • Time-based clicking (e.g. every day/week/fortnight/month at 08:00 am)

Building from Source 🔝

OS specific requirements

Fedora Rawhide (not tested)

dnf install clang clang-devel clang-tools-extra speech-dispatcher-devel libxkbcommon-devel pkg-config openssl-devel libxcb-devel

Linux

sudo apt-get install libx11-dev libxtst-dev libevdev-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev

# Install `libfontconfig-dev` if you get the following error
# error: failed to run custom build command for `servo-fontconfig-sys v5.1.0`
sudo apt-get install libfontconfig-dev

Running

rustup update
cargo run --release

Linux crash fix

export WINIT_UNIX_BACKEND=x11
./launch_your_app

Build

rustup update
cargo build --release

Contributing 🔝

Please follow the CONTRIBUTING.md guide.

rusty-autoclicker's People

Contributors

chancellorceti avatar cph-w avatar frankschmitt avatar mrtanoshii avatar nozwock avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rusty-autoclicker's Issues

reduce CPU usage

On Windows even if auto-clicking isn't enabled, due to egui/eframe it seems, there's something like 6% CPU usage(on 12 cores cpu (6+6)) constantly(more or less) but which noticeably turns on CPU fans to audible sounds for me, compared to when rust-autoclicker isn't running at all.

this probably cannot be fixed... i don't know.

EDIT: it's less noticeable if build with --release
EDIT2: even with --release but in Gentoo Linux, the cpu usage is between 18.8% and 20% constantly, as reported by top, and makes X process stay at a constant 9.9% to 10.9% as well instead of the usual 1.0% to 2.0%. But at least in Linux here the fans aren't spinning up and it seems the cpu speed isn't going higher than the minimum of 800Mhz (when using the powersave governor)

App does not run on Windows

Reproducible steps

Working

  • cargo run (--release)
  • .\target\release\rusty-autoclicker.exe

Not Working

  • cargo build (--release)
  • Double click .exe to launch

It seems to be starting as I can see the icon appearing briefly on my taskbar and in task manager.

Remove hardcoded app icon in favor of soft linked using path

Problem

The app icon is currently hardcoded in icon.rs. This gets the job done but is not ideal.

I have previously tried using include_bytes but did not have any luck.

Solution

The app icon should be provided to the code as a link and embedded in the binary during `cargo build

The path should be the relative link to the icon in the assets folder: ./assets/icon-64x64.ico

Should autoclick counter be reset after completion?

While working on #12 , I noticed that the autoclick counter isn't being reset after the configured number of clicks has been performed:

// Increment click counter and stop autoclicking if completed
self.click_counter += 1u64;
if click_amount != 0u64 && self.click_counter >= click_amount {
  self.is_autoclicking = false;
}

Therefore, when you re-enter autoclick mode, the app only performs a single click (unless you set it to 0 = infinite clicking). Is this intentional?

Insufficient project documentation

Problem

Rusty AutoClicker was created out of my personal need for an autoclicker while playing games.
Initially, I wanted something portable, fast, reliable, lightweight and open-source.
The project grew organically from there and there is little documentation about what the focus of the software design is about.

Solution

Write down the core design philosophies and assess the current state of the project against them.

Additional Context

It might be a good idea to look into metrics/benchmarks. (Optional; may become its own issue)

Multiple monitors mess with the mouse coordinates

I have two monitors, one on top of eachother, when trying to run the click I set the coordinates on the monitor below, but, when executing the clicker, it clicked on the top monitor, even though I clicked on the other monitor when setting the coordinates, my fix was to just add 1080 to the height coordinate and with that I managed to use it.

Coordinate Mode does not properly support multiple monitors (windows)

Coordinate selector properly addresses monitors when they are to the right of or above the primary monitor, but when secondary monitors are to the left of or below the primary monitor the selector will properly display coordinates following a grid with its origin located at the bottom left of the primary monitor, with negative values, however the coordinates will be filled in the main window as their absolute value (- removed). Additionally, when auto-clicking the program will incorrectly move the mouse to the coordinate position assuming the origin is located furthest left and down of the monitor setup, instead of the bottom left of the primary monitor as it should.

I tried to make this as clear as possible, but did a poor job. please ask for clarification if necessary.

TL;DR
when main display is located bottom left of all displays, things work correctly
when main display is located right or above secondary display(s), things do not work correctly, as the Coord picker does not fill negative values, and the mouse position uses an incorrect origin.

Automate compilation of binaries and releases

The Problem

I only have access to Windows and Linux platforms.
Rusty Autoclicker should be compatible with macOS but I am unable to compile the macOS binary.
I would have to have all 3 platform binaries in the releases.

Is it possible to automate this process via GitHub actions artifacts?
Ideally the action would produce a draft release that maintainers/collaborators can release manually.

UI/UX Designer help needed

I would like the help of a UI/UX designer for the purpose of

  • Simplying the current app
  • Figuring out the best way to add more functionality without cluttering the main interface

For example #48 is requesting key autoclicking which is something I would like to see in the rusty-autoclicker but I want an expert opinion on the matter.
My current plan is to add a tab for this functionality which replaces the main interface or a sidetab/sidemenu that expands/collapses.

Add a "click remaining" label

Feature

  • When clicking for a specific number (non-zero), a label indicating the number of clicks remaining should be available
  • The label should be to the left of the input field
  • The label should decrement as clicks are being sent
  • The label should be hidden when the autoclicker is not being run

Implement humanlike mouse movement

Problem

The app currently uses the rdev crate rdev::EventType::MouseMove to move the mouse immediately to the target click location.

This behavior is fine for the "Bot" app mode but may not be ok for the "Humanlike" mode.

Potential solution

For "Humanlike" mode only

  1. Implement a smooth humanlike mouse movement
    • Add setting to specify mouse move speed,
    • Add setting to enable/disable smooth humanlike mouse movement
  2. Delay the mouse click until the mouse is at the target location

Relevant code

app.rs autoclick()

Unable to start application on MacOS

Mac OS Monterrey 12.6 with no external mouse connected

thread 'main' panicked at 'index out of bounds: the len is 5 but the index is 5', src/app.rs:747:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

This issue is caused by the device_query::MouseState returning less button_pressed than is accessed by index for the UI button pressed string. This causes a panic and the application is not usable.

Clean code

Figure out which platforms are supported and remove unnecessary code (looking at you wasm...)

Remove blocking `thread::sleep()`s

Problem

thread::sleep()s are currently implemented to allow:

  • macOS to catch up
  • humanlike mode

Solution

They should be removed in favor of code execution being tested against delta_time

Relevant code

app.rs send()
app.rs autoclick()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.