Sign in to follow this  
Followers 0
shades99

script that autoclicks.

8 posts in this topic

Hello, I am a newbie of the great autoit script. I really need some help.

I would like to make a small script that makes this:

-Auto-click the right mouse button every 2nd second.

-It should have an on and off command.

-It should be specific for a certain game.

I have tried over and over. I manage to do a loop that clicks alright, but to get that loop to have an on and off button is beyond me. This script is actually for a online game (MMORPG) where the right mouse button fires the weapon. I need it so I don't get repetetive stress injury.

Any help would be appreciated..

Thanks in advance..

Share this post


Link to post
Share on other sites



Hello, I am a newbie of the great autoit script. I really need some help.

I would like to make a small script that makes this:

-Auto-click the right mouse button every 2nd second.

-It should have an on and off command.

-It should be specific for a certain game.

I have tried over and over. I manage to do a loop that clicks alright, but to get that loop to have an on and off button is beyond me. This script is actually for a online game (MMORPG) where the right mouse button fires the weapon. I need it so I don't get repetetive stress injury.

Any help would be appreciated..

Thanks in advance..

Welcome to the forums! Great to see another game thingo! :)

Lets see your code then :)

Share this post


Link to post
Share on other sites

Just open the help and look for "Hotkeyset"

CODE
; Press Esc to terminate script, Pause/Break to "pause"

Global $Paused

HotKeySet("{PAUSE}", "TogglePause")

HotKeySet("{ESC}", "Terminate")

HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d

;;;; Body of program would go here ;;;;

While 1

Sleep(100)

WEnd

;;;;;;;;

Func TogglePause()

$Paused = NOT $Paused

While $Paused

sleep(100)

ToolTip('Script is "Paused"',0,0)

WEnd

ToolTip("")

EndFunc

Func Terminate()

Exit 0

EndFunc

Func ShowMessage()

MsgBox(4096,"","This is a message.")

EndFunc

Just replace the the ;;;; Body of program would go here ;;;; wit your code

Share this post


Link to post
Share on other sites

Hotkeyset("{ESC}", enditall")
While 1
Sleep(2000)
Mouseclick("left")
WEnd

Func enditall()
Exit
endfunc

Share this post


Link to post
Share on other sites

By the way..If your looking for a Diablo II Hammerbot...Ive made one :) Not Sure If This Is Your Purpose...But Its All Good!

Share this post


Link to post
Share on other sites

@Swift: He wants to pause the script, not exit it.

Thats why i already postet the helpfile text

Share this post


Link to post
Share on other sites

thanks for the suggestions. Do you think it's possible to also have a start hotkey in the script?

Share this post


Link to post
Share on other sites

Yes. Here is a example i already posted:

http://www.autoitscript.com/forum/index.php?showtopic=57715

CODE

HotKeySet("{F5}", "Start")

HotKeySet("!{F5}","Quit")

TogglePause()

Func Start()

HotKeySet("{F5}")

HotKeySet("{F5}", "TogglePause")

ToolTip('Script on', 0, 20)

While 1

PixelSearch(88, 38, 143, 38, 0xFF3C51)

If Not @error Then

Send("{8}")

EndIf

Sleep(500)

WEnd

EndFunc

Func TogglePause()

ToolTip('Script off',0,20)

HotKeySet("{F5}")

HotKeySet("{F5}", "Start")

While 1

sleep(100)

WEnd

EndFunc

func Quit()

Exit

EndFunc

Share this post


Link to post
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
Sign in to follow this  
Followers 0