Code: Select all
#SingleInstance Force
SetTitleMatchMode, 2
Sendmode Input
; ----- Part of MENU -----
Msgbox, 4, TF2 Voice Module, Do you want to run this script?
IfMsgbox, NO
ExitApp
; ----- Activate Voice Chat -----
XButton1::
Send, {v down}
Return
; ----- Go into chrome, paste song, search, click first song -----
XButton2::
ControlClick, x1102 y134, (379), ,Left, , NA
ControlSend, Chrome_RenderWidgetHostHWND1, {Ctrl down}{a down}{a up}{v}{Ctrl up}{ENTER}, (379)
Sleep, 3000
ControlClick, x577 y295, (379), ,Left, , NA
; ----- Chrome refreshes, losing focus on game. -----
If WinActive("ahk_class Chrome_WidgetWin_1")
{
WinSet, Bottom,, (379)
WinActivate, Team Fortress 2
Sleep, 3000
}
Return
!r::
Msgbox, Reload
Reload