- Notifications
You must be signed in to change notification settings - Fork0
A screenshot capture tool for Medley Interlisp
License
pamoroso/bitsnap
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Bitsnap is a screenshot capture tool written in Interlisp for the Medley environment. It can capture screenshots of the full screen, a window or its interior, or an arbitrary area. Screenshots can optionally be saved to a file inPBM (Portable BitMap) format which some operating systems display natively and is easy to convert to other formats withNetpbm and other utilities.
To install Bitsnap download the source file BITSNAP from the project repo, copy it to a file system location your Medley Interlisp installation has access to, change to that location, and compile the source by evaluating the following expression at an Interlisp Exec:
(TCOMPL 'BITSNAP)
Provide these answers to the questions the compiler asks:
- listing? no
- redefine? yes
- save exprs? no
Finally, from the same directory load the compiled file by evaluating:
(FILESLOAD BITSNAP)
or:
(LOAD 'BITSNAP.LCOM)
You can use Bitsnap interactively or call it from Lisp.
Bitsnap adds the itemScreenshot
to the background menu of Medley. Select this item to capture the full screen. The item has a submenu with items that let you capture the following areas of the screen:
Screen
: the full screenWindow
: a windowSelected
: an arbitrary area
In turnWindow
has a submenu with items for capturing the following portions of a window:
Full
: the whole window including the title bar and borderInterior
: the interior of the window with no title bar or borders
Selected
will let you swipe out with the mouse an area of the screen.
When selectingWindow
,Full
, orInterior
follow the instructions in the prompt window (the black one) to designate the window to capture.
After the capture Bitsnap will ask in the prompt window to enter a file name to save the image to, and it will use the defaultscreenshot.pbm
if none is entered. It will then save the file and display for feedback the image in a window, which may be closed with the usualClose
item of the right-click menu. The displayed image has the original size of the captured area, except for the full screen which Bitsnap displays at half size.
To capture screenshots from Lisp call the following function in theIL
package:
(SNAP what where)
The function captures the area of the screen indicated bywhat
, optionally saves it to the destination indicated bywhere
, and returns a bitmap of the area.
SNAP
captures the full screen ifwhat
isNIL
. Otherwise the function captures the area specified by the symbol passed as the value ofwhat
:
WINDOW
: a window including the title bar and borderINTERIOR
: the interior of a window with no title bar or bordersSELECTION
: an arbitrary area
SNAP
prompts the user to indicate the required window or area.
Ifwhere
isNIL
the function doesn't save the captured area but still returns a bitmap of it. Ifwhere
isT
the function prompts for a file name to save the area to. Otherwisewhere
must be a file name to save the area.
Bitsnap is developed byPaolo Amoroso.
This code is distributed under the MIT license, see theLICENSE
file.
About
A screenshot capture tool for Medley Interlisp