; Script to expand a pattern
; written by James Johnston

UPDATEPATTERN
setstring nor ROWS
DIVIDE 2 nor
setstring nor2 nor
MULTIPLY 2 nor

SUBTRACT 2 nor
mtoff
vbkey {HOME}{HOME}{HOME}{HOME}

setstring not TRACKS
COMPARE GLOBALEXIST YES
ISNOTEQUAL skipmd

vbkey {TAB}
SUBTRACT 1 not


LABEL skipmd

SETSTRING TRACKCOUNT 0
LABEL again

setstring count 0
VBKEY {pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}{pgup}
LABEL loop
ADD 1 count
vbkey {DOWN}{DEL}
COMPARE nor count
ISGREATER loop

vbkey {TAB}
ADD 1 TRACKCOUNT

COMPARE TRACKCOUNT not
ISLESS again
vbkey ^{BS}{TAB}
vbkey nor2
vbkey {ENTER}
VBKEY {PGUP}{PGUP}{PGUP}{PGUP}{PGUP}{PGUP}{PGUP}{PGUP}{PGUP}{PGUP}{PGUP}{PGUP}{PGUP}{PGUP}{PGUP}
mton
INFO Done!
ENDSCRIPT


