In the GoBetwino download there's sample code demonstrating how to use the RFLIN command type.
You just repeat calling the RFLIN command you setup until it returns -2 which indicates that the requested line does not exist
pseudocode:
X=1
repeat
give me line x
x+=1
until GoBetwino returns -2