Jump to content
Sign in to follow this  
gomjabar

request for a script

Recommended Posts

gomjabar

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.

Share this post


Link to post
Share on other sites
BrettF
tAKTelapis

Carpal Tunnel is a condition of the wrists..

personally don't see how this script is going to prevent it.

Share this post


Link to post
Share on other sites
Somerset

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


 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites
gomjabar

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

Share this post


Link to post
Share on other sites
gomjabar

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

Share this post


Link to post
Share on other sites
PsaltyDS

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 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

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  

×