XaSnap - Screenshot-tool for XaAES and N.AES
Download:
xasnap.zip (
Changelog)
Important: May 21st 2026 the XAAESNAP protocol was removed from XaAES. This means that
with XaAES releases after this date you will need to install KbTweaks
in order to use XaSnap. XaSnap will continue to support the
XAAESNAP protocol for older XaAES releases.
This program is mainly intended as a companion to Lonny Pursell's
ImgView, but it works equally well with ImageCopy, zView or other
viewers/converters that can read truecolour IMG-files. If you're not
using truecolour screenmodes just about any image-viewer will work.
Install
Start xasnap.prg from xaaes.cnf, or let the desktop or Taskbar
autostart it. Unless you use an XaAES release from before May 21st
2026 you will also need to install
Keyboard
Tweaks. XaSnap will automatically register the following keyboard
shortcuts with Keyboard Tweaks:
- Alt+Help - screenshot of entire screen.
- Alt+Shift+Help - screenshot of the top window.
- Alt+Shift+S - select area to screenshot.
These will be configurable later.
Use
When you press the hotkey combination that initiates a screenshot of a selectable screen
section is pressed, the mouse cursor turns into a crosshair. Move it to the top left corner
of the section you want to screenshot and press and hold the left mousebutton. Move the mouse
to the lower right corner of the section and release it. Now the XaSnap UI is displayed. When
you press the screen/window hotkeys the XaSnap UI is displayed immediately.
- View. Asks ImgView (if running) or the desktop/AV-server to display
the screenshot. ImgView will then let you save the screenshot in
various formats more suited for the modern world.
- Save. Let you save the screenshot as an IMG file.
- Clipboard. Copies the screenshot to the clipboard, so you can paste
it in a document/program/whatever that use the GEM clipboard for
images. So you can take a screenshot and paste it directly into
e.g. Papyrus.
- Cancel. Discards the screenshot.
- XIMG. Screenshots in truecolour (16 bit and above) are normally saved
in plain IMG format, as there is no palette in these images.
However, some programs will complain about "wrong format" if
there's no XIMG header, and some will complain if it's there.
So if the program you attempt to load the IMG with complains,
try flipping this option.
Palette-based images (4, 16 and 256 colours) are always saved with
an XIMG header.
- Reduce colours. A lot of programs does not understand truecolour
IMG files, like Papyrus or GEMView. If your screenshot is intended
for one of these you can reduce the number of colours to
256/16/mono.
NB! This option is only available when NVDI 5.03 is installed.
(c) joska@online.no, June 2026
The XAAESNAP protocol
Important: May 21st 2026 the XAAESNAP protocol was removed from XaAES. This means
that the information below is irrelevant for all XaAES releases after this date.
When the screenshot keyboard shortcut is pressed (Control+Alt+D by
default) XaAES will present you with a dialog where you select what to
snap - block (selected with the mouse), top window or entire screen. When
you've done your choice XaAES will look for an application with the AES
process name "XAAESNAP", and send an AES message to this application:
msg[0]: 0x5354
msg[1]: XaAES apid
msg[2]: -
msg[3]: -
msg[4]: x
msg[5]: y
msg[6]: w
msg[7]: h
x and y is the upper left corner of the rectangle to snap, w and h is
width and height.
At this point the XaAES dialog is removed from the screen, but the screen
is still locked. XAAESNAP now stores a copy of the portion of the screen given
by the coordinates in the message. When this is done XAAESNAP sends a reply
to XaAES:
msg[0]: 0x5354
msg[1]: XAAESNAP's apid
msg[2]: -
msg[3]: 1 - success. 0 - failure
msg[4]: -
msg[5]: -
msg[6]: -
msg[7]: -
XaAES will now release the screen, and XAAESNAP is free to display it's own
GUI (if any).
NB! At the time of writing (Feb. 2025) there seems to be a couple of problems
with this XaAES feature.
- Window topping/untopping is messed up after calling the screenshot tool.
- Sometimes the screen is not properly unlocked, causing problems for XaSnap
and sometimes resulting in a complete lock-up of the screen which requires
a restart of XaAES.