Jump to content

Autoclicker that toggles when i hit middle button


Recommended Posts

I don't know anything about scripting other than what ive learned in the past 30 minutes. I stole some other dude's autoclicker script and did my best to make it start and stop when I hit middle button but I can't get it to work.

#include<IE.au3>
#include <Misc.au3>

HotKeySet("{`}","close")
HotKeySet("{c}" , "startpause")

Dim $click = False
$dll = DllOpen("user32.dll")

Func close()
    Exit
 EndFunc

While 1
   if _IsPressed("04") = True Then
      sleep(250)
      If $click = False Then
         $click = True
         ToolTip("ON" , 1500 , 845)
      Else
         $click = False
         ToolTip("OFF" , 1500 , 845)
      EndIf
   EndIf
WEnd

Func startpause()
   If $click = False Then
      $click = True
      ToolTip("ON" , 1500 , 845)
   Else
      $click = False
      ToolTip("OFF" , 1500 , 845)
   EndIf
EndFunc


While 1
   If $click = True Then
      MouseClick("left")
      Sleep(100)
   EndIf
WEnd

The original autoclicker toggled when i hit c. Now it doesn't work either with c or with middle mouse. The tooltip in the bottom right saying on and off works for both c and middle mouse, but it wont click. i have no idea why it stopped working with c as i did not tamper with the func startpause part or the while 1 if $click = true part. all i did was add the while1 if _ispressed part. it would be great if you could tell me what im doing wrong and how to fix it.

Link to comment
Share on other sites

  • Developers

mmm  did you read our forum rules, especially the part about Game automation or is this for Click-Testing a News Website? 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

not locked, and no mention of game, so I'll have a go at it.

#include<IE.au3>
#include <Misc.au3>

HotKeySet("{`}","close")
HotKeySet("{c}" , "startpause")

Dim $click = False
$dll = DllOpen("user32.dll")

Func close()
    Exit
 EndFunc

While 1
   if _IsPressed("04") = True Then
      sleep(250)
      If $click = False Then
         $click = True
         ToolTip("ON" , 1500 , 845)
      Else
         $click = False
         ToolTip("OFF" , 1500 , 845)
      EndIf
   EndIf
   If $click = True Then
      MouseClick("left")
      Sleep(100)
   EndIf
WEnd

Func startpause()
   If $click = False Then
      $click = True
      ToolTip("ON" , 1500 , 845)
   Else
      $click = False
      ToolTip("OFF" , 1500 , 845)
   EndIf
EndFunc

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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