Task

Send simulated keystrokes to a GUI window, or terminal.

You should specify whether the target may be externally created
(i.e., if the keystrokes are going to an application
other than the application that is creating them).




 100  REM SIMULATE KEYBORD INPUT
 110  GOSUB 170"OPEN&WRITE KB
 120  PRINT "HOME:RUN140"M$"MARK
 130  PRINT D$C$A$"EXEC"F$: END 
 140  INPUT "NAME? ";N$
 150  PRINT "HELLO, "N$"!"
 160  END 
 170 D$ =  CHR$ (4):C$ = "CLOSE"
 180 M$ =  CHR$ (13):O$ = "OPEN"
 190 F$ = "KB":A$ = F$ + M$ + D$
 200  PRINT D$"MON I"M$D$O$;
 210  PRINT A$C$A$"DELETE"A$O$;
 220  PRINT A$"WRITE"F$: RETURN 