home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / lisp / mcl / 1941 < prev    next >
Encoding:
Text File  |  1993-01-06  |  2.4 KB  |  68 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!olivea!apple!cambridge.apple.com!bill@cambridge.apple.com
  2. From: bill@cambridge.apple.com (Bill St. Clair)
  3. Newsgroups: comp.lang.lisp.mcl
  4. Subject: Re: screen dump - can MCL call fkeys?
  5. Message-ID: <9301061932.AA27252@cambridge.apple.com>
  6. Date: 6 Jan 93 20:36:20 GMT
  7. Sender: info-mcl-request@cambridge.apple.com
  8. Lines: 57
  9. Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
  10.  
  11. >Date: Mon, 4 Jan 1993 14:36:09 -0400
  12. >To: info-mcl@cambridge.apple.com, gwer1@cislabs.pitt.edu (Gerhard Werner)
  13. >From: Robert A. Cassels <cassels@cambridge.apple.com>
  14. >X-Sender: cassels@ministry.cambridge.apple.com
  15. >Subject: Re: screen dump
  16. >
  17. >At 10:13 AM 1/4/93 -0500, Gerhard Werner wrote:
  18. >>In the old Allegro Lisp running in operating system 6 versions, one
  19. >>could freeze a picture of the screen for printing, using a program called
  20. >>screendump. How can one copy a picture of the screen running MCL in
  21. >>system 7 ?
  22. >
  23. >In System 7, Command-shift-3 takes a snapshot of the whole screen.  (See
  24. >the "Finder Shortcuts" window, page 5.)  As straz mentioned, there are
  25. >various shareware programs that give more fine-grained control over what's
  26. >in the picture.
  27.  
  28. >Date: Mon, 4 Jan 93 15:59:29 -0500
  29. >To: straz@cambridge.apple.com (Steve Strassmann)
  30. >From: steele (Oliver Steele)
  31. >X-Sender: steele@cambridge.apple.com
  32. >Subject: Re: screen dump - can MCL call fkeys?
  33. >Cc: bug-mcl
  34. >
  35. >At  1:44 PM 1/4/93 -0500, Steve Strassmann wrote:
  36. >>Can MCL invoke an fkey? If so, how? He can simply call one of the
  37. >>dozen or so screen capture fkeys out there.
  38. >
  39. >Load the FKEY resource, lock it, jsr to it, and release it.
  40.  
  41. ; press-fkey.lisp
  42. ;
  43. ; Code to invoke an FKEY from MCL.
  44.  
  45. (defun press-fkey (number)
  46.   (flet ((reserr ()
  47.            (let ((errnum (#_ResError)))
  48.              (unless (eql 0 errnum)
  49.                (ccl::%err-disp errnum)))))
  50.     (let ((resource (#_GetResource :FKEY number)))
  51.       (reserr)
  52.       (when (%null-ptr-p resource)
  53.         (error "No FKEY number ~s" number))
  54.       (#_LoadResource resource)
  55.       (reserr)
  56.       (with-pointers ((p resource))
  57.         (ff-call p)))))
  58.  
  59. #|
  60. ; To take a snapshot of the screen(s) in System 7:
  61. (press-fkey 3)
  62.  
  63. ; The result appears as a TeachText file named "Picture <n>" at
  64. ; top level of your system volume. You can use TeachText to copy a
  65. ; rectangular region for pasting into any application that supports
  66. ; PICT scraps.
  67. |#
  68.