gomjabar Posted May 30, 2007 Posted May 30, 2007 Hi, ive used auto it scripts in the past but have very little knowledge of writting them. I need a script to prevent me from getting carpal tunnel. All it has to do is when I am holding down the right mouse button it auto clicks ever 1/3 of a second or so. Thanks ahead of time.
BrettF Posted May 30, 2007 Posted May 30, 2007 Isn't a carpal tunnel a condition on your hands???? My advice- goto rentacoder.com 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!
tAKTelapis Posted May 30, 2007 Posted May 30, 2007 Carpal Tunnel is a condition of the wrists.. personally don't see how this script is going to prevent it.
Somerset Posted May 30, 2007 Posted May 30, 2007 Global $Paused HotKeySet("{End}", "Terminate") HotKeySet("{f1}", "Clicking") 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 Clicking() HotKeySet("{f1}", "TogglePause") while 1 sleep(333) MouseClick("right") wend EndFunc
gomjabar Posted May 30, 2007 Author Posted May 30, 2007 Thanks Beerman...Me and the tendons in my wrist (carpal tunnal) thank you Global $Paused HotKeySet("{End}", "Terminate") HotKeySet("{f1}", "Clicking") 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 Clicking() HotKeySet("{f1}", "TogglePause") while 1 sleep(333) MouseClick("right") wend EndFunc
gomjabar Posted May 30, 2007 Author Posted May 30, 2007 only problem I get with the script is trying to make it work while a game window is active. im trying this, ive cut and pasted from a different script trying to get it to work. Any idea whats wrong? im pretty sure the window title is correct. $win_title = "Dungeons and Dragons Online" Global $Paused HotKeySet("{End}", "Terminate") HotKeySet("{f3}", "Clicking") if not WinExists($win_title, "") then msg($win_title & " window must be open.") Exit endif WinActivate($win_title, "") 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 Clicking() HotKeySet("{f3}", "TogglePause") while 1 sleep(Random(500,700)) MouseClick("right") wend EndFunc
PsaltyDS Posted May 30, 2007 Posted May 30, 2007 (edited) only problem I get with the script is trying to make it work while a game window is active. im trying this, ive cut and pasted from a different script trying to get it to work. Any idea whats wrong? im pretty sure the window title is correct. If the $WinTitle is wrong, you'll get a message box with the error, now that the MsgBox() is fixed. I didn't understand the logic of the seperate clicking function, so I moved it into the main While loop. It comes up 'Paused' and F3 simply toggles the $Paused flag. The main loop does all the work: Global $Paused = True Global $win_title = "Dungeons and Dragons Online" HotKeySet("{End}", "Terminate") HotKeySet("{F3}", "TogglePause") If Not WinExists($win_title, "") Then MsgBox(16, "Error", $win_title & " window must be open.") Exit EndIf WinActivate($win_title, "") WinWaitActive($win_title, "") While 1 If $Paused Then ToolTip('Press F3 to start right-clicking,' & @LF & "or END to exit.", 0, 0) Else ToolTip('Press F3 to stop right-clicking,' & @LF & "or END to exit.", 0, 0) Sleep(Random(400, 600)) MouseClick("right") EndIf Sleep(100) WEnd Func TogglePause() $Paused = Not $Paused EndFunc ;==>TogglePause Func Terminate() Exit 0 EndFunc ;==>Terminate If this doesn't work, maybe there is something blocking simulated mouse inputs... Edited May 30, 2007 by PsaltyDS Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
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