
How to make your own Invoker script in Dota 2
With the power of AutoHotkey, it’s an easy task to automate games, to make shortcuts for different spells for example. It’s easy to learn the AutoHotkey language and I highly recommend it to you, you can have a lot of fun, not just in games, you can also make shortcuts everywhere in you daily routine. This means a lot of saved time in the long term. In this article you can take a quick look at how you can learn to control this hero. I also made a long video about the entire process. You can learn how you can make a fancy Gui and how you can use AutoHotkey in games.
This video I’ve created guides you trough all the necessary steps. Including how to create a Gui and how to use functions that will allow you control your spells by hotkeys. I’ve tried to explain everything, if you have any questions don’t hesitate to contact me.

I attached the PSD (Photoshop) file in case you would like to modify the pictures. The layers are named properly, you can find the file in the zip file.

How can I use it?
There are two possible way to use the script:
You download the script in a compiled format (exe)
You create an ahk file and use it with installed AutoHotkey
Download this zip file for the Graphics and the compiled EXE, AHK file or the PSD file
I recommend to download it if you are not familiar with AutoHotkey yet
The full AutoHotkey code
The following code can be copied, you can create your own .ahk file.
#NoEnv
#Persistent
#SingleInstance, Force
SendMode, Input
SetWorkingDir, %A_ScriptDir%
SetTitleMatchMode, 2
SetTitleMatchMode, Fast
; ========================================================================
global states:= ["qqq","www","eee"]
global i
; ========================================================================
Gui_Invoker()
; ========================================================================
^q::Invoker_Spell("Coldsnap")
^w::Invoker_Spell("GhostWalk")
^e::Invoker_Spell("IceWall")
^r::Invoker_Spell("EMP")
^a::Invoker_Spell("Tornado")
^s::Invoker_Spell("Alacrity")
^d::Invoker_Spell("DeafeningBlast")
^f::Invoker_Spell("SunStrike")
^3::Invoker_Spell("SpiritForge")
^4::Invoker_Spell("ChaosMeteor")
CapsLock::Invoker_ChangeState()
F12::ExitApp
; ========================================================================
Gui_Invoker(){
Gui, +LastFound +AlwaysOnTop +ToolWindow -Caption
Gui, Color, EEFFFF
WinSet, TransColor, EEFFFF 225
Width:= 64
GuiCommand:= ["w" Width " ys","w" Width],
Path:= A_ScriptDir . "\img\"
Gui, Add, Picture, % GuiCommand[2], % Path "Cold-Snap.png"
Gui, Add, Picture, % GuiCommand[1], % Path "Tornado.png"
Gui, Add, Picture, % GuiCommand[1], % Path "EMP.png"
Gui, Add, Picture, % GuiCommand[1], % Path "Ice-Wall.png"
Gui, Add, Picture, % GuiCommand[1], % Path "Ghost-Walk.png"
Gui, Add, Picture, % GuiCommand[1], % Path "Alacrity.png"
Gui, Add, Picture, % GuiCommand[1], % Path "Chaos-Meteor.png"
Gui, Add, Picture, % GuiCommand[1], % Path "Deafening-Blast.png"
Gui, Add, Picture, % GuiCommand[1], % Path "Sun-Strike.png"
Gui, Add, Picture, % GuiCommand[1], % Path "Forge-Spirit.png"
Gui, Show, y43
hwnd_Gui:= WinExist()
WinSet, ExStyle, ^0x20, ahk_id %hwnd_Gui%
return
}
Invoker_Spell(spell){
Spells:= [ ["ColdSnap", "qqq"]
, ["GhostWalk", "qqw"]
, ["IceWall", "qqe"]
, ["EMP", "www"]
, ["Tornado", "wwq"]
, ["Alacrity", "wwe"]
, ["DeafeningBlast","qwe"]
, ["SunStrike", "eee"]
, ["SpiritForge", "eeq"]
, ["ChaosMeteor", "eew"] ]
loop % Spells.Length(){
if InStr(Spells[A_Index][1],spell){
SendInput(Spells[A_Index][2] "r" states[i])
return
}
}
}
Invoker_ChangeState(){
i++
(i=4) ? (i:= 1) : i
SendInput(states[i])
return
}
SendInput(hotkeys){
SendInput, %hotkeys%
return
}
The code explanation
Work in progress…
; >> SOON >>



for Mac OS plsssssss
need this for Mac OS
Hi Amir,
Unfortunately, AutoHotkey doesn’t support macOS.
How can we hide the shortcut icon showing in the desktop ?
Hi Shiro, add +toolwindow to the first Gui command.
how to display these gui with open dota? in mine it only appears when it minimizes. I cant see gui while dota on the window ?
Hi Dark, Gui +AlwaysOnTop will help you.
Hello, today script not working anymore on me, its saying me you cant max that skill, and doesnt happen anything when i try to change skills
what i nice guid:) me and my m8s play alot of fun modes. but i cant get it to work :( is it outdatede ?