home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 5117 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.5 KB  |  66 lines

  1. Path: draco.prima.ruhr.de!ehb
  2. Newsgroups: comp.sys.amiga.programmer
  3. Subject: Re: Processes
  4. Distribution: world
  5. References:  <812.6641T87T157@epma.demon.co.uk>
  6. From: ehb@draco.prima.ruhr.de (Edwin H. Bielawski)
  7. Message-ID: <ehb.03lj@draco.prima.ruhr.de>
  8. Date: Sat, 9 Mar 96 09:53:18 +0100
  9. Organization: private UUCP site Dortmund Scharnhorst (Germany), member of Prima e.V.
  10.  
  11. In article <812.6641T87T157@epma.demon.co.uk> andy@epma.demon.co.uk (andy) writes:
  12. >
  13. >Hi,
  14. >
  15. >I've got a bit of a problem with AmigaDOS which I was hoping somebody out
  16. >there may be able to help me with :)
  17. >
  18. >I need to be able to find out the process number of a task so that I can break
  19. >it later on... i.e.
  20. >
  21. >Run Animshower
  22. >wait 30 secs
  23. >break Animshower
  24. >
  25. >Is there any way that I can find out simply (through DOS or ARexx I don't
  26. >wanna waste time writing real code :-)  what the process number of a task is
  27. >so that I can store this and later use it to break the task?
  28.  
  29. Yes, by using the Status command.
  30.  
  31. I've wrote a batch file.
  32.  
  33.   o /
  34. ---x
  35.   o \
  36.  
  37. .key COMMAND/A,BREAK
  38. .def BREAK All
  39. .bra ½
  40. .ket ╗
  41.  
  42. Status >ENV:BreakProcess COM=½COMMAND╗
  43. If "$BreakProcess" EQ ""
  44.         echo "Process '½COMMAND╗' not found"
  45. Else
  46.         BREAK $BreakProcess ½BREAK╗
  47. EndIf
  48. UnSetEnv BreakProcess
  49.  
  50.   o /
  51. ---x
  52.   o \
  53.  
  54. When the process is started with a path, use it here too!
  55.  
  56. Run path/Animshower
  57. wait 30 secs
  58. cbreak path/Animshower
  59.  
  60.   <ehb
  61.  
  62. -- 
  63.              greetings from draco.prima.ruhr.de
  64.  
  65.                     Edwin H. Bielawski
  66.