Thanks so much for eveything.. would you please look at my script for me...
At the top I have listed what I want it to do... but only some of it is working. Maybe you could see what I have done wrong?
Thanks
Code: Select all
#SingleInstance
/*
NOTES:
t == press and hold e
g == rapid fire press e
b == press and hold Left Mouse Button
Middel Mouse Button == press and hold w, press Middle Mouse Button or w or s or a or d to stop holding down w
F11 == halts any recuring loops, incase you forget what is turned on or get confused. Simply resets eveything.
p == Pause Scrtip
*/
paused := false
; -------------------------------------------------------------------------------------------------------------
; F11 halts any latent executions, in case you forget the state of your toggles!
; plays a little beep sound
; -------------------------------------------------------------------------------------------------------------
F11::
settimer, dogather, off
Click, up, X2
Click, up
SoundBeep, 300, 100
return
; -----------------------------------------------------------------------------------------------------------------------------------------------
; Double press Middel Mouse Button move forward wioth out touching anything, Press again to stop. The number if how fast you need to double click
; -----------------------------------------------------------------------------------------------------------------------------------------------
MButton::
if (A_TimeSincePriorHotkey < 400)
SendInput {w down}
else
SendInput w
; -------------------------------------------------------------------------------------------------------------
; makes the g key toggle a loop which calls the dogather function (below)
; this is useful for gathering leaves. Just press the key once and run around to rapidly autogather.
; Press again to stop.
; -------------------------------------------------------------------------------------------------------------
$g::
gather := not gather
if gather
{
settimer, dogather, 40
}
else
{
settimer, dogather, off
}
return
; -------------------------------------------------------------------------------------------------------------
; the dogather function simply clicks mouse button 2 a single time, which is my interact key.
; the timer defined above is therefore basically executing rapidfire left clicks (40 milliseconds apart)
; -------------------------------------------------------------------------------------------------------------
dogather:
Send, e
return
; -------------------------------------------------------------------------------------------------------------
; This bind causes the t key to toggle holding down the interact key, which again for me is mouse thumb button 2 (X2)
; This means you don't have to hold down your interact button to manually mine from deposits or to mine away rocks
; -------------------------------------------------------------------------------------------------------------
t::
if (A_TimeSincePriorHotkey < 400)
SendInput {e down}
else
SendInput e
; -------------------------------------------------------------------------------------------------------------
; this bind causes the b to to toggle holding down the left mouse button. Useful for manual crafting.
; -------------------------------------------------------------------------------------------------------------
b::
holdbutton1 := not holdbutton1
if holdbutton1
{
Click, down
}
else
{
Click, up
}
Return
; -------------------------------------------------------------------------------------------------------------
; this bind toggles suspension of all of the scripts.
; when pressed, if suspending you will hear a high pitch/low pitch "turning off" sound
; press again to resume, reloading the script and playing a reverse sound
; this is useful if you want to alt-tab out and type something without accidentally causing your mouse to do weird stuff!
; -------------------------------------------------------------------------------------------------------------
p::
Suspend
Pause, , 1
paused := not paused
if not paused
{
SoundBeep, 600, 100
SoundBeep, 700, 100
Reload
}
else
{
SoundBeep, 700, 100
SoundBeep, 600, 100
}
Return
;--------------------------- Unused -----------------------------------------
; -------------------------------------------------------------------------------------------------------------
; XButton1 is mouse thumb button 1. Binding this to escape makes it way way easier to exit dialogs, build mode, etc
; -------------------------------------------------------------------------------------------------------------
;XButton1::ESC