XaSnap - Screenshot-tool for XaAES and N.AES
Download:
xasnap.zip (
Changelog)
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
No installation or configuration is necessary, just run xasnap.app.
Run it from xaaes.cnf or let the desktop autostart it to keep it
available at all times.
If you want to use it under N.AES or in a more efficient manner under
XaAES you will need Keyboard Tweaks to handle the keyboard shortcuts.
XaaES accepts three messages in addition to the XaAES snapshot message
(see below):
- 0x5355 - take a screenshot of the entire screen.
- 0x5356 - take a screenshot of the top window.
- 0x5357 - take a screenshot of a user selected section of the screen.
To use this with
Keyboard Tweaks add the following lines to kbtweaks.cnf:
Action screenshot_full message "XAAESNAP" 0x5355,apid,0,0,0,0,0,0
Action screenshot_win message "XAAESNAP" 0x5356,apid,0,0,0,0,0,0
Action screenshot_select message "XAAESNAP" 0x5357,apid,0,0,0,0,0,0
This defines an action for each screenshot mode, and you can now set up
hotkeys to use these:
Hotkey Alt+Help released action screenshot_full
Hotkey Alt+LShift+Help released action screenshot_win
Hotkey Alt+RShift+Help released action screenshot_win
Hotkey Alt+LShift+s released action screenshot_select
You can use any (within reason, see the Keyboard Tweaks manual) keyboard
combination, these are just examples that happens to resemble what I'm
used to on my PC.
Use
To take a snapshot press Control+Alt+D. XaAES will now prompt you to
either select a block with the mouse, take a screenshot of the top
window or the entire screen. Make your choice, and XaSnap will display
a dialog with the following options:
- 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, Feb. 2025
The XAAESNAP protocol
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.