 Down = WhereY();
 PutKey($7600) Rem Ctrl+PgDn
 Down = WhereY();
 PutKey($8400) Rem Ctrl+PgUp
 MinLeft = 255
loop:
 PutKey($4700) Rem Home
 if find("[^ ]","c-f+w-r+s-") <> 1 then GoTo L1
 Left = WhereX();
 Medium = Medium + Left
 Count = Count + 1
 if MinLeft > Left then MinLeft = Left
L1:
 PutKey($5000) Rem Down
 if WhereY() == Down then GoTo Done
 GoTo Loop
Done:
 Medium = Medium / Count
 PutStr("^KK")
 PutKey($8400) Rem Ctrl+PgUp
 PutStr("^KB")
U1:
 PutStr("^KU")
 if (Medium = Medium-1) <> 0 then GoTo U1
 PutStr("^KH")
