; Script to expand a pattern
; written by James Johnston

UPDATEPATTERN
setstring nor ROWS
MULTIPLY 2 nor
vbkey ^{BS}{TAB}
vbkey nor
vbkey {ENTER}

SUBTRACT 2 nor

vbkey {HOME}{HOME}{HOME}{HOME}

setstring not TRACKS
COMPARE GLOBALEXIST YES
ISNOTEQUAL skipmd

vbkey {TAB}
SUBTRACT 1 not


LABEL skipmd

SETSTRING 0 TRACKCOUNT
LABEL again

setstring 0 count
vbkey {PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}{PGDN}
LABEL loop
ADD 1 count

vbkey {UP}{INSERT}
COMPARE nor count
ISGREATER loop

vbkey {TAB}
ADD 1 TRACKCOUNT

COMPARE TRACKCOUNT not
ISLESS again
INFO Done!
ENDSCRIPT


