Jump to content

Recommended Posts

Posted

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.

Posted

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

 

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
×
×
  • Create New...