home *** CD-ROM | disk | FTP | other *** search
- '─ Area: F-QUICKBASIC ─────────────────────────────────────────────────────────
- ' Msg#: 343 Date: 24 Apr 94 13:09:00
- ' From: Saul Ansbacher Read: Yes Replied: No
- ' To: Howard Hull Jr Mark:
- ' Subj: Keyboard buffer stuffer..
- '──────────────────────────────────────────────────────────────────────────────
- 'But you could stuff the keyboard buffer and then exit. You could stuff
- 'the name of an exe or com file to run, provided you changed to that
- 'drive/directory. If you needed to pass params., then you could creat a
- 'batch file (with open, print #, and all that) and then stuff the name of
- 'the batch file and run it (it could even delete it self later). Here is
- 'some code that will let you stuff 14 chars plus an enter...
-
- DEFINT A-Z
- DECLARE SUB StuffBuffer (Cmd$)
-
- DEFSNG A-Z
- SUB StuffBuffer (Cmd$) STATIC
-
- 'Limit the string to 14 characters plus Enter
- 'and save the length.
-
- Work$ = LEFT$(Cmd$, 14) + CHR$(13)
- Length = LEN(Work$)
-
- 'Set the segment for poking, define the buffer
- 'head and tail, and then poke each character.
-
- DEF SEG = 0
- POKE 1050, 30
- POKE 1052, 30 + Length * 2
-
- FOR X = 1 TO Length
- POKE 1052 + X * 2, ASC(MID$(Work$, X))
- NEXT X
-
- DEF SEG
-
- END SUB
-