suspend CoordMode, Pixel, Relative SetKeyDelay -1, -1 enterPressed := 0 active := 0 RegRead, customKeyLocation, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III, InstallPath customKeyLocation = %customKeyLocation%\CustomKeys.txt settimer, TimerTick, 5000 bnetnick = "" ;Read Inventory keys from CustomKeys.txt Keys := X,X,X,X,X,X initKeys() initKeys() { global Loop { FileReadLine, line, %customKeyLocation%, %A_Index% if(A_Index>25) { break } if(ErrorLevel) { PromptForfile() break } Items = 1,2,3,4,5,6 Loop, parse, Items, `, { IfInString, line, [item%A_Index%] { StringReplace, hotkey, line, // [item%A_Index%]=, , All Keys%A_Index% := hotkey if(hotkey <> "#") { ;MsgBox, %hotkey% is now active Hotkey, %hotkey%, i%A_Index%, ON } } } } } InsideWarcraft() { ifWinActive, Warcraft III return true else return false ;return true } TurnOn() { if(A_IsSuspended==1) { suspend } } TurnOff() { if(A_IsSuspended==0) { suspend } } SendMsgInGame(msg) { global bnetnick GetLatestBnetNick() SendInput, {Enter}/w %bnetnick% %msg% {Enter} } GetLatestBnetNick() { global bnetnick RegRead, bnetnick, HKEY_CURRENT_USER, Software\Blizzard Entertainment\Warcraft III\String, userbnet } PromptForFile() { InputBox, customKeyLocation, CustomKeys.txt, CustomKey Generator was unable to locate your CustomKeys.txt.`r`nPlease fill in the exact location below.`r`n`r`nExample: D:\Games\Warcraft III\CustomKeys.txt, , 400, 165 } EnterAction() { global if(InsideWarcraft()) { if(active == 1) { if(enterPressed == 0) { enterPressed := 1 CapFix() TurnOff() } else { enterPressed := 0 TurnOn() } } } } CapFix() { state := GetKeyState("Capslock", "T") if(state) SetCapsLockState, Off } TimerTick: if(active == 1) { ifWinNotActive, Warcraft III { active := 0 TurnOff() } } return *F5:: Suspend, Permit if(InsideWarcraft()) { active := 1 enterPressed := 0 SoundPlay,*64 TurnOn() } else { sendInput, {F5} } return *F6:: Suspend, Permit if(InsideWarcraft()) { active := 0 SoundPlay,*48 TurnOff() } else { sendInput, {F6} } return $Enter:: Suspend, Permit EnterAction() SendInput, {Enter} return $+Enter:: Suspend, Permit EnterAction() SendInput, +{Enter} return i1: SendInput, {Numpad7} return i2: SendInput, {Numpad8} return i3: SendInput, {Numpad4} return i4: SendInput, {Numpad5} return i5: SendInput, {Numpad1} return i6: SendInput, {Numpad2} return ~Space:: if(enterPressed = 0) { SendInput, {F1}{F1} } return ~Esc:: Suspend, Permit if(InsideWarcraft()) { enterPressed := 0 TurnOn() } return F9:: ClickSkill(9, "right") return F4:: Suspend, Permit color := 0 PixelGetColor, color,0,0 MsgBox, The Color of the top left pixel is %color% return ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This function was developed by "Kitt" ;; Rightclick the n-th position of the skill grid and move mouse back to the original position ClickSkill(SkillSpot, type = "Left") { if(SkillSpot <> none) { CoordMode, Mouse, Relative MouseGetPos,xMouse,yMouse WinGetPos,,,Width,Height,A xSpot := Mod(SkillSpot - 1, 4) ySpot := (SkillSpot - xSpot + 1)/4 Width := Width*(0.80 + xSpot*0.055) Height := Height*(0.78 + ySpot*0.07) ;Click %type%,%Width%,%Height% MouseClick ,%type% , %Width%,%Height%, 1 , 0 MouseMove,xMouse,yMouse,0 } }