# My AHK script

**URL:** <https://forums.sourceruns.org/t/my-ahk-script/1697>\
**Category:** Off-Topic\
**Created:** [March 20, 2010, 2:00pm UTC](https://forums.sourceruns.org/t/my-ahk-script/1697 "2010-03-20T14:00:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DemonStrate](https://b-cdn.sourceruns.org/user_avatar/forums.sourceruns.org/demonstrate/32/10_2.png) [@DemonStrate](https://forums.sourceruns.org/u/DemonStrate)\
**Post date:** [March 20, 2010, 2:00pm UTC](https://forums.sourceruns.org/t/my-ahk-script/1697/1 "2010-03-20T14:00:52Z")

</div>

Just posting this in here since I can’t send all the text in a steam message.

/\*  
Transgenic’s AHK Script  
Desc: This is my global AHK script for all games, apps, etc.

Revision History:  
04/11/2009 Refactored code, created blocked layout, added EssenceRO script for autoloot items on gld\_dun01  
04/12/2009 Added xbutton2 binding for EssenceRO for Taekwon’s kick skills, Enter loop for Survival Arena  
04/14/2009 Added Lucky\_Candy to autoloot gld\_dun01 script for ERO  
04/29/2009 Added Braid section, Added Braid jump script  
05/10/2009 Added Half-Life Section, Added jump script (for any Half-Life game)  
05/13/2009 Added Warcraft III section, added TD banking commands  
05/25/2009 Added orb jumping to Half-Life section  
06/04/2009 Rebound orb jumping to k, added f for object climbing  
08/16/2009 Changed eRO enter loop to numpadadd  
\*/

;GLOBAL VARIABLES  
RerecordCount := 0

;GLOBAL KEY BINDINGS  
\*PAUSE::Suspend

;Scripts

;Portal

#IfWinActive Portal

;f = Wall Jump Key  
\*f::  
Loop  
{  
GetKeyState,state,f,P  
if state = U  
break

```
Send,{space}{e} ;Alternate: SendEvent, {blind}{space}
Sleep,1

```

}  
return

;capslock = ABH Key  
\*capslock::  
Loop  
{  
GetKeyState,state,capslock,P  
if state = U  
break

```
Send,{space}
Sleep,1

```

}  
return

;r = r & RerecordCount++  
r::  
RerecordCount := RerecordCount + 1  
Send,r  
return

;numpad0 = Rerecord message display  
numpad0::  
MsgBox Rerecords: %RerecordCount%  
return

;numpad7 = Reset RerecordCount  
numpad7::  
RerecordCount := 0  
return

;EssenceRO

#IfWinActive EssenceRO

;ctrl = All buffs for a Mechanic (commented code is from Rune Knight)  
ctrl::  
Send,{f2}  
Sleep,250  
Send,{f5}  
Sleep,200  
Send,{f6}  
Sleep,200  
Send,{f7}  
Sleep,200  
Send,{f8}  
Sleep,200  
/\*Send,{f9}  
Sleep,50  
Send,{shift down}  
Sleep,20  
Send,{Lbutton}  
Sleep,20  
Send,{shift up}  
\*/  
return

;xbutton1 = xbutton1  
;This is here because, for some reason, the f1 and f2 loops do not function correctly  
;without setting a side mouse button (xbutton1 or xbutton2) before their code.  
xbutton1::  
Send,{xbutton1}  
return

;f1 = f1 Loop, if f1 and mouse1, then f1 and mouse1 loop  
\*f1::  
Loop  
{  
GetKeyState,state,f1,P  
if state = U  
break

```
Send,{f1}
Loop
{
	GetKeyState,state2,LButton,P
	if state2 = U
		break

	Sleep,10
	Send,{LButton}
	Sleep,10
	Send,{f1}
}
Sleep,10

```

}  
return

;f2 = f2 Loop, if f2 and mouse1, then f2 and mouse1 loop  
\*f2::  
Loop  
{  
GetKeyState,state,f2,P  
if state = U  
break

```
Send,{f2}
Loop
{
	GetKeyState,state2,LButton,P
	if state2 = U
		break

	Sleep,10
	Send,{LButton}
	Sleep,10
	Send,{f2}
}
Sleep,10

```

}  
return

;numpadsub = Autoloot items and Autoloot percent for gld\_dun01  
numpadsub::  
Send @ali Burn\_Tree{Enter}  
Send @ali Glass\_Bead{Enter}  
Send @ali Silver\_Knife\_Of\_Chaste{Enter}  
Send @ali Royal\_Jelly{Enter}  
Send @ali Fox\_Tail{Enter}  
Send @ali Flame\_Heart{Enter}  
Send @ali Golden\_Jewel{Enter}  
Send @ali Angel’s\_Warmth{Enter}  
Send @ali Western\_Grace{Enter}  
Send @ali 29554{Enter}  
Send @al 74{Enter}  
return

;xbutton2 = Cycle through taekwon kick skills on a loop  
\*xbutton2::  
Loop  
{  
GetKeyState,state,xbutton2,P  
if state = U  
break

```
Send,{f6}
Sleep,1
Send,{f7}
Sleep,1
Send,{f8}
Sleep,1
Send,{f9}
Sleep,1

```

}  
return

;numpadadd = Enter loop for Survival Arena  
\*numpadadd::  
Loop  
{  
GetKeyState,state,numpadadd,P  
if state = U  
break

```
Send,{enter}
Sleep,1

```

}  
return

;Fallout 3

#IfWinActive Fallout3

;f = Bunny hop test, commented code is including sneak  
\*f::  
Loop  
{  
GetKeyState,state,f,P  
if state = U  
break

```
Send,{space down}
Send,{space up}
Sleep,1
/*Send,{ctrl down}
Send,{ctrl up}
Sleep,1
*/

```

}  
return

;Braid

#IfWinActive Braid

;f = Jump loop  
\*f::  
Loop  
{  
GetKeyState,state,f,P  
if state = U  
break

```
Send,{space down}
Send,{space up}
Sleep,1
/*Send,{ctrl down}
Send,{ctrl up}
Sleep,1
*/

```

}  
return

;Half-Life

#IfWinActive HALF-LIFE

;capslock = ABH/BH Key  
\*capslock::  
Loop  
{  
GetKeyState,state,capslock,P  
if state = U  
break

```
Send,{space}
Sleep,1

```

}  
return

;k = Orb jump Key  
\*k::  
Loop  
{  
GetKeyState,state,k,P  
if state = U  
break

```
Send,{space} ;Alternate: SendEvent, {blind}{space}
Sleep,5
Send,{ctrl}
Sleep,5

```

}  
return

;f = Wall Jump Key  
\*f::  
Loop  
{  
GetKeyState,state,f,P  
if state = U  
break

```
Send,{space} ;Alternate: SendEvent, {blind}{space}
Sleep,5
Send,{e}
Sleep,5

```

}  
return

\*xbutton2::  
Loop  
{  
GetKeyState,state,xbutton2,P  
if state = U  
break

```
Send,{xbutton2}
Sleep,125

```

}  
return

;Warcraft III

#IfWinActive Warcraft III

;NumpadSub = Type -da  
NumpadSub::  
Send,{Enter}  
Send -da  
Send,{Enter}  
return

;NumpadAdd = Type -wa  
NumpadAdd::  
Send,{Enter}  
Send -wa  
Send,{Enter}  
return

;Team Fortress 2

#IfWinActive Team Fortress 2

;capslock = ABH/BH Key  
\*capslock::  
Loop  
{  
GetKeyState,state,capslock,P  
if state = U  
break

```
Send,{space}
Sleep,1

```

}  
return

#IfWinActive Left

;capslock = ABH/BH Key  
\*capslock::  
Loop  
{  
GetKeyState,state,capslock,P  
if state = U  
break

```
Send,{space}
Sleep,670

```

}  
return

---

<div class="post-metadata">

**Author:** ![HelenJames](https://b-cdn.sourceruns.org/letter_avatar_proxy/v4/letter/h/f07891/32.png) [@HelenJames](https://forums.sourceruns.org/u/HelenJames)\
**Post date:** [July 20, 2010, 4:57pm UTC](https://forums.sourceruns.org/t/my-ahk-script/1697/2 "2010-07-20T16:57:16Z")

</div>

I have send you in pm
