shades99 Posted February 1, 2008 Posted February 1, 2008 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..
BrettF Posted February 1, 2008 Posted February 1, 2008 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 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
Kademlia Posted February 1, 2008 Posted February 1, 2008 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
Swift Posted February 1, 2008 Posted February 1, 2008 Hotkeyset("{ESC}", enditall") While 1 Sleep(2000) Mouseclick("left") WEnd Func enditall() Exit endfunc
Swift Posted February 1, 2008 Posted February 1, 2008 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!
Kademlia Posted February 1, 2008 Posted February 1, 2008 @Swift: He wants to pause the script, not exit it. Thats why i already postet the helpfile text
shades99 Posted February 2, 2008 Author Posted February 2, 2008 thanks for the suggestions. Do you think it's possible to also have a start hotkey in the script?
Kademlia Posted February 2, 2008 Posted February 2, 2008 Yes. Here is a example i already posted:http://www.autoitscript.com/forum/index.php?showtopic=57715CODEHotKeySet("{F5}", "Start")HotKeySet("!{F5}","Quit")TogglePause()Func Start()HotKeySet("{F5}")HotKeySet("{F5}", "TogglePause")ToolTip('Script on', 0, 20)While 1PixelSearch(88, 38, 143, 38, 0xFF3C51)If Not @error ThenSend("{8}")EndIfSleep(500)WEndEndFuncFunc TogglePause()ToolTip('Script off',0,20)HotKeySet("{F5}")HotKeySet("{F5}", "Start")While 1sleep(100)WEndEndFuncfunc Quit()ExitEndFunc
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now