Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!uakari.primate.wisc.edu!aplcen!haven!adm!xadmx!J_SCHULL%HVRFORD.BITNET@cornellc.cit.cornell.edu From: J_SCHULL%HVRFORD.BITNET@cornellc.cit.cornell.edu Newsgroups: comp.lang.pascal Subject: Turbo Pascal challenge: a program-running-program. Message-ID: <21187@adm.BRL.MIL> Date: 18 Oct 89 23:18:16 GMT Sender: news@adm.BRL.MIL Lines: 25 Not for the first time, I wish I had a program that would feed keystrokes to another program (like SuperKey, but not memory resident). This would allow us to make a simple program which could be run from DOS, which would in turn send a stereotyped keystroke sequence to another (awkwardly "user-obsequieous") program. I imagine that you would just need to (somehow) put the keystrokes into the keyboard buffer, and then EXEC the driven program. But I can't figure out how. Can you? Example: if the program were called RUN and you wanted it to run UGLYMENU, and choose menu items 2, 4, 6, and 9 in that order (9 terminates program UGLYMENU). You might type A:>RUN UGLYMENU 2469 from DOS, and UGLYMENU would think someone was typing "2469" and then terminate. RUN would also terminate. (The program would be useful in more complicated circumstances, but if I had the code for the example, I'd know how to proceed).