Jump to content

Auto Clicker problem


Recommended Posts

I have been trying to make a auto clicker but I cannot make it stop.

Here is the code.

#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
#include <StaticConstants.au3>
Global $input
$main = GUICreate("AutoClicker", 180, 100, -1, -1)
$button1 = GUICtrlCreateButton("Run", 5, 50, 50, 40)
$button2 = GUICtrlCreateButton("Stop", 65, 50, 50, 40)
GUISetState(@SW_SHOW,$main)

While True
    Switch GUIGetMsg()
        Case $button1
            $stop = False
            While $stop = False
                $Mposx=MouseGetPos(0)
                $Mposy=MouseGetPos(1)
                MouseClick("", $Mposx, $Mposy, 1)
                Sleep(1000)
                If GUIGetMsg() = $button2 Then $stop = True
            WEnd
        Case -3
            Exit
    EndSwitch
    Sleep(10)
WEnd

All help is appreciated :)

Link to comment
Share on other sites

What is this for ?

Edited by Maffe811

[font="helvetica, arial, sans-serif"]Hobby graphics artist, using gimp.Automating pc stuff, using AutoIt.Listening to music, using Grooveshark.[/font]Scripts:[spoiler]Simple ScreenshotSaves you alot of trouble when taking a screenshot!Don't remember what happened with this, but aperantly the exe is all i got.If you don't want to run it, simply don't._IsRun UDFIt figures out if the script has ben ran before based on the info in a ini file.If you don't want to use exactly what i wrote, you can use it as inspiration.[/spoiler]

Link to comment
Share on other sites

There's only 1 problem with it. It's against the rules. Even if you did made this game yourself and it's singleplayer game only you are not allowed to automate it.

Do not discuss any of the following:

* Automating games or game servers.

edited

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...