Quirky script

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Quadzilla
Posts: 28
Joined: 05 Mar 2017, 17:51

Quirky script

25 Jul 2017, 11:29

Hey all, does this script look ok? Sometimes E doesn't toggle and sometimes \ doesn't stop everything, sometimes when multiple keys are hit like ] and E.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#SingleInstance force ; Only one instance at a time
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

;; DEBUG output
Cinit()
running := 0
spaceDisabled := False

\::
	Cadd("stop everything")
	; stop movement
	ControlSend, , {LShift up}{Up up}, ARK: Survival Evolved
	; stop everything
	running := 0
	; stop spamming E
	eToggle := FALSE
	; stop spamming LCtrl
	LCtrlToggle := FALSE
return

#IfWinActive, ARK: Survival Evolved

+PgDn::WheelDown
+PgUp::WheelUp

; Toggles spamming E (Use)
eToggle = 0
#MaxThreadsPerHotkey 2
E::
	Cadd("Spamming E")
    eToggle := !eToggle ; reverses the variable, but if you want to make [E] key always turn this thing on - use TRUE instead
    While eToggle
	{
        ControlSend, , {E}, ARK: Survival Evolved
        sleep 100
    }
return

+F12::
	; toggles pausing spam E for typing
	Cadd("script toggle")
	Hotkey, E, toggle

+E::
	; Shift+E, Hit E just once
	Cadd("hit e once")
	ControlSend, , {E}, ARK: Survival Evolved
return

W::
	; Hold E down for 5 seconds
	Cadd("holding e")
	ControlSend, , {E down}, ARK: Survival Evolved
	sleep 5000
	ControlSend, , {E up}, ARK: Survival Evolved
	Cadd("not holding e")
return

+0::
	; Holds LButton down for 1.5 seconds
	Cadd("holding LButton")
	ControlSend, , {LButton down}, ARK: Survival Evolved
	sleep 1500
	ControlSend, , {LButton up}, ARK: Survival Evolved
	Cadd("releasing LButton")
return

LCtrl::
	; Toggles spamming Melee/Pistol Whip (LCtrl)
	Cadd("Spamming LCtrl")
    LCtrlToggle := !LCtrlToggle ; reverses the variable, but if you want to make [E] key always turn this thing on - use TRUE instead
    While LCtrlToggle
	{
        ControlSend, , {LCtrl}, ARK: Survival Evolved
        sleep 100
    }
return

[::
	; walk
	Cadd("walk")
	ControlSend, , {LShift up}{Up down}, ARK: Survival Evolved
return

]::
	; run
	Cadd("run")
	ControlSend, , {LShift down}{Up down}, ARK: Survival Evolved
return

;CONSOLE CONTROLS
Cadd(text)
{
   global
   FormatTime, NowStamp, %A_now%, HH:mm:ss
   text := NowStamp . " " . text
   Ctext := text . "`n" . Ctext ;newest lines on top of course
   GuiControl,consoleLog:, Ctext, %Ctext%
}

Cinit()
{
   ;; LOG CONSOLE GUI
   Gui, consoleLog:Add, Edit,w200 h100 vCtext hScroll
   Gui, consoleLog:show, AutoSize x0 y0
   Winset, Alwaysontop, , A
}
Quadzilla
Posts: 28
Joined: 05 Mar 2017, 17:51

Re: Quirky script

07 Aug 2017, 10:10

Can someone please take a look at this? Everything looks fine to me.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ulysim and 321 guests