Skip to content

Generating colorschemes

Alloyed edited this page Nov 13, 2014 · 2 revisions

Taken from issue #27, by Dragoon

FileAppend, `nFilename: %1%`n,ColorVar.txt
FileAppend, [,ColorVar.txt
vFirstComma = 0

loop, Read, %1%, ColorVar.Txt
{
    vLength := StrLen(A_LoopReadLine)

    If vLength > 18
        Continue
    vPosition := InStr(A_LoopReadLine,":" )
    If vPosition = 0
        Continue
    Else
    {
        If vFirstComma > 0 
            FileAppend, `,
        vColor := SubStr(A_LoopReadLine, vPosition + 1, (vLength-vPosition -1 ))
        FileAppend, %vColor%
        vFirstComma++
    }
}   

FileAppend, ], ColorVar.txt
Clone this wiki locally