'$INCLUDE: 'QBX.BI' DECLARE SUB ScanInput (Train$) DECLARE SUB InsertKeys (Keys$) ScanInput Train$ InsertKeys Keys$ SHELL Program$ SUB InsertKeys (Keys$) DIM Reg AS RegType, I%, Length% Length% = LEN(Keys$) IF Length% > 15 THEN Length% = 15 FOR I% = 0 TO Length% - 1 Reg.ax = &H500 Reg.cx = ASC(MID$(Keys$, I% + 1)) Interrupt &H16, Reg, Reg NEXT END SUB SUB ScanInput (Train$) SHARED Program$, Keys$ Train$ = LCASE$(COMMAND$) FOR J% = 1 TO LEN(Train$) IF MID$(Train$, J%, 1) = CHR$(64) THEN MID$(Train$, J%, 1) = CHR$(13) IF MID$(Train$, J%, 1) = CHR$(126) THEN MID$(Train$, J%, 1) = CHR$(27) NEXT FOR J% = 1 TO LEN(Train$) IF MID$(Train$, J%, 1) = CHR$(32) THEN EXIT FOR NEXT Program$ = LEFT$(Train$, J% - 1) Keys$ = RIGHT$(Train$, LEN(Train$) - J%) END SUB