home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / talk / bizarre / 38185 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  2.6 KB

  1. Path: sparky!uunet!seismo!darwin.sura.net!spool.mu.edu!agate!doc.ic.ac.uk!uknet!edcastle!damianj
  2. From: damianj@castle.ed.ac.uk (Damian Jackson)
  3. Newsgroups: talk.bizarre
  4. Subject: Re: Frustrated newbie: how do I emulate a terminal programatically?
  5. Message-ID: <28170@castle.ed.ac.uk>
  6. Date: 15 Nov 92 15:35:36 GMT
  7. References: <1992Nov14.235148.17845@ousrvr.oulu.fi>
  8. Organization: Edinburgh University
  9. Lines: 50
  10.  
  11. se15@pius (Algorhythm) writes:
  12.  
  13. >I've been playing a multi user dungeon for a while now, and it's
  14. >fiendishly difficult and time consuming! I want to write a program that
  15. >will play this game on my behalf :-), so I can come back after a week and
  16. >my character will have progressed a few levels. The idea I had in mind was
  17. >to write a C program to emulate a terminal replacing the normal keyboard
  18. >input with input generated by my program. This would then log on to the
  19. >mud, and play my character involving parsing the mud's responses, and
  20. >deciding what commands to send the mud.
  21.  
  22. >So now the problem: I've been searching the on-line unix manual for help
  23. >with terminal emulation, but nothing seems to work. Using the "system"
  24. >command from C, I can telnet to the mud, but after this, the input reverts
  25. >to keyboard, and my program doesn't resume until I manually log off the
  26. >mud.I've tried opening tty devices, and pty devices and writing to them
  27. >but this doesn't seem to execute the commands.
  28.  
  29. >As you can see, my knowlege of unix is pretty hopeless.. I hope no one is
  30. >offended.. :-)
  31.  
  32. >Please mail me if you can help.
  33. >Thanks for reading..
  34.  
  35. >Paul
  36.  
  37. I've been reading news and posting articles for a while now, and it's
  38. fiendishly difficult and time consuming! I want to write a program that
  39. will deal with news on my behalf :-), so I can come back after a week and
  40. my net.status will have progressed a few levels. The idea I had in mind was
  41. to write a C program to emulate a terminal replacing the normal keyboard
  42. input with input generated by my program. This would then execute `nn'
  43. and play my character involving parsing other peoples' responses, and
  44. deciding what posts to send or save.
  45.  
  46. So now the problem: I've been searching the on-line unix manual for help
  47. with terminal emulation, but nothing seems to work. Using the "system"
  48. command from C, I can execute `nn', but after this, the input reverts
  49. to keyboard, and my program doesn't resume until I manually quit `nn'.
  50. I've tried opening tty devices, and pty devices and writing to them
  51. but this doesn't seem to execute the commands.
  52.  
  53. As you can see, my knowlege of unix is pretty hopeless.. I hope no one is
  54. offended.. :-)
  55.  
  56. Please mail me if you can help.
  57. Thanks for reading..
  58.  
  59. Roger "Mr Happy :-)" Carasso
  60. --
  61.