home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15484 < prev    next >
Encoding:
Text File  |  1992-09-14  |  1.2 KB  |  31 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!gurgle
  3. From: gurgle@netcom.com (Pete Gontier)
  4. Subject: Re: Easiest way to find my PSN (Process Serial Number)
  5. Message-ID: <x-znmmf.gurgle@netcom.com>
  6. Date: Tue, 15 Sep 92 05:49:13 GMT
  7. Organization: cellular
  8. References: <1992Sep14.213345.14845@midway.uchicago.edu>
  9. Lines: 20
  10.  
  11. ejw1@kimbark.uchicago.edu (Eric Weidl) writes:
  12.  
  13. >    Is there any easy way to determine my own Process Serial Number?  
  14.  
  15. GetCurrentProcess. There are also constants which you can stuff
  16. into a PSN, but I can never remember their names, so I just call
  17. the trap. :-)
  18.  
  19. >    The reason I want to know my PSN is so that I can call
  20. >SetFrontProcess() to bring myself to the foreground in response to an 
  21. >AppleEvent.  I've tried every combination of parameters in AESend() and 
  22. >AEInteractWithUser(), but to no avail. So, I thought I'd try
  23. >SetFrontProcess.
  24.  
  25. This will certainly work, and I'm no expert on AE, but I believe the
  26. idea is to let the sender of the event decide whether your app should
  27. come to the front. Perhaps forcing your app to the front is not a
  28. desirable effect.
  29. -- 
  30.  Pete Gontier // EC Technology // gurgle@netcom.com
  31.