Fortress Survival Load Script (using Autohotkey)
Until autoloading is natively implemented to FSA (You gotta have hope ), I wrote a small script with autohotkey to load my last code automatically with alt+X. Here's how:
- Install Autohotkey: http://www.autohotkey.com/
- Download the load.zip file attached and uncompress it (or copy the code below in the notepad, then save it with the .ahk extension)
; Warcraft III: Fortress Survival Autoloading
; Written by Ethaw - 26/04/2015
; How to use:
; Modify the"D:\Games\Warcraft III\" part below to your own Warcraft III directory
; Press alt+x to load your last code once in game
#IfWinActive Warcraft III
#InstallKeybdHook
!x::Code()
Code(){
Loop, D:\Games\Warcraft III\FortressCodes\*.txt
{
If (A_LoopFileTimeCreated>Rec)
{
FPath=%A_LoopFileFullPath%
Rec=%A_LoopFileTimeCreated%
}
}
FileReadLine, line, %Fpath%, 4
loadcode := Trim(line)
BlockInput, On
SendInput {Enter}%loadcode%{Enter}
BlockInput, Off
} - Modify the "D:\Games\Warcraft III\" in the code to your own W3 directory - don't forget to save the file
- Execute the .ahk file (you can place it wherever you want), an icone in the bottom right corner will appear
- Press Alt+X once in game
- Profit
Ps: I had to compress the .ahk file because the forum doesn't allow me to upload it...
PsĀ²: had to use the quote function instead of the code one, because the police color is ridiculously dark in the latter
Ps3: I think implementing that in the map shouldn't be hard (not exactly an "autoload", but at least a -load command searching for the last code automatically, on the local client), but I don't know much about the JASS functions available
load.zip 521bytes 30 downloads