home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / pascal / 5358 < prev    next >
Encoding:
Text File  |  1992-09-12  |  1.8 KB  |  39 lines

  1. Newsgroups: comp.lang.pascal
  2. Path: sparky!uunet!mcsun!news.funet.fi!uwasa.fi!ts
  3. From: ts@uwasa.fi (Timo Salmi)
  4. Subject: Re: Capturing DOS prompt...
  5. Message-ID: <1992Sep13.071323.8586@uwasa.fi>
  6. Organization: University of Vaasa, Finland
  7. References: <1992Sep12.070015.13141@uxa.ecn.bgu.edu>
  8. Date: Sun, 13 Sep 1992 07:13:23 GMT
  9. Lines: 28
  10.  
  11. In article <1992Sep12.070015.13141@uxa.ecn.bgu.edu> mudrc@uxa.ecn.bgu.edu (Daniel R. Crowson) writes:
  12. >  I'm still having problems about how to capture the prompt within a
  13. >  program and then 'outputting' it.  I have a shell program, but I want
  14. >  it to use the normal dos prompt ($p$g).  I know you can get the prompt
  15. >  by getenv('prompt'), but is there a way to output it?
  16.  
  17. Let's try another tack.  What is your underlying task at hand?  Do
  18. you want to capture the original problem or is it that you wish to
  19. be able to manipulate the prompt when you shell out of your program? 
  20. If it is the latter, then it is far from as simple as reading the
  21. environment variable.  One needs to access the PSP and manipulate
  22. that, which is quite a complicated task. 
  23.  
  24. There is one alternative which I have not tested for the latter for
  25. this particular purpose, so it might not work although I cannot see
  26. outright why it wouldn't.  I have a SETENVSH routine in my
  27. distrubuted TP units collection (/pc/ts/tspa*.zip) for setting an
  28. environment variable for the duration of a shelling.  (It accesses
  29. the PSP). 
  30.  
  31. But note that this was guesswork, partly based on what I guess you
  32. might basically be needing this for.
  33.  
  34. ..................................................................
  35. Prof. Timo Salmi
  36. Moderating at garbo.uwasa.fi anonymous FTP archives 128.214.87.1
  37. Faculty of Accounting & Industrial Management; University of Vaasa
  38. Internet: ts@uwasa.fi Bitnet: salmi@finfun   ; SF-65101, Finland
  39.