Coder Social home page Coder Social logo

clicker's Introduction

golang-autoclicker

Auto Clicker for Desktop Applications in Golang to Simulate Mouse Clicks

Robotgo Package

Used robotgo package for controlling the mouse events.

Overview

My Dad wanted a way to simulate clicks for a game called Plarium Vikings to auto click and apply tasks within the game. There's a couple of tools out there that does that already, but you need to pay for them.

So, because I'm on a Golang learning journey, I will write my own one in golang.

1. Getting the Mouse Coordinates

Using getpointer.go: it will sleep for 2 seconds, then return the coordinates of your mouse's position. You will use those coordinates to plot where the mouse need to move.

Example:

$ go run getpointer.go
pos: 966 621
pos: 849 356

2. Main App: Move and Click

I have 2 positions that I want the mouse to move to and click, then with a combination of a while loop, I just reiterate between clicking on two positions

After you start your mouse will move to the plotted locations and click as soon as it gets to the coordinate.

$ go run autoclick.go
Starting iteration
Moving Mouse
Clicking
Delaying with 2 Seconds
Moving Mouse
Clicking
Delaying with 2 Seconds
finising iteration
...
finising iteration
finished all iterations

clicker's People

Contributors

ruanbekker avatar pniedzwiedzinski avatar

Watchers

James Cloos avatar  avatar  avatar

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.