Emulator with screenshot button
- Gears of Games
- Drutt
- Posts: 43
- Joined: Sun Nov 12, 2023 9:13 am
- Location: Lalaland
- Contact:
Emulator with screenshot button
I use Spectaculator as my primary Speccy emulator. I often take a bunch of screenshots and it's a bit frustrating that there isn't a keyboard shortcut to do this in Spectaculator, you have to use "File/Save As". Do you guys know of a decent Speccy emulator that have a keyboard shortcut for screenshots? Need it to be able to save in the native resolution too...
Re: Emulator with screenshot button
Hi. You can do that with Inkspector’s snippets, which are little Lua scripts. There are 10 of them and each can customised and run with keyboard shortcuts Alt-1 for snippet 1, through to Alt-0 for snippet 10. So to do what you want, fire up Inkspector, go to the Snippets → Edit Snippets menu to bring up the snippets editor.
Select a snippet (1-10) from the drop down on the right-hand side of the Snippet Editor toolbar and replace the existing script with the following:
You can press the Rename toolbar button to give the snippet a meaningful name, such as “screen grab” or whatever. Close the Snippet Editor (just to ensure the snippet changes are recorded).
Then each time you press the appropriate snippet shortcut key (e.g. Alt-1 if you’ve used Snippet #1), the script will run and drop a numbered screen capture file into the c:\scr_captures directory, automatically incrementing the capture number each time so you can repeatedly capture snapshots without overwriting the previous file. Make sure you’ve created the directory before you first run the snippet though.
If you want to save .gif screenshots rather than .scr files, change lines 2 and 3 to the following:
The upcoming Inkspector 2.0.6 also allows you to save .gif screenshots that animate should there be at least one flashing attribute on the Spectrum display at the time the capture is taken.
Inky.
Select a snippet (1-10) from the drop down on the right-hand side of the Snippet Editor toolbar and replace the existing script with the following:
Code: Select all
if not num then num = 1 end
path=[[c:\scr_captures\scr_#]]..num..".scr"
inks.save(path)
num = num + 1
Then each time you press the appropriate snippet shortcut key (e.g. Alt-1 if you’ve used Snippet #1), the script will run and drop a numbered screen capture file into the c:\scr_captures directory, automatically incrementing the capture number each time so you can repeatedly capture snapshots without overwriting the previous file. Make sure you’ve created the directory before you first run the snippet though.
If you want to save .gif screenshots rather than .scr files, change lines 2 and 3 to the following:
Code: Select all
path=[[c:\scr_captures\scr_#]]..num..".gif"
inks.save_gif(path)
Inky.
- Gears of Games
- Drutt
- Posts: 43
- Joined: Sun Nov 12, 2023 9:13 am
- Location: Lalaland
- Contact:
Re: Emulator with screenshot button
Thank you for replying! This seems a bit involved, but should be doable, even for me! Does it support .PNG by any chance? Also will this be saving native resolution screenshots, preferably without any border.
Re: Emulator with screenshot button
It sounds more involved than it is
Yes, the .gif files will be saved without a border. There's an optional 2nd parameter to inks.save_gif() that controls whether a border is included. By default it isn't, but if you later decide you do want a border, just change the save_gif line to
Currently, the only way to save .png screenshots is by using the File -> Save Screenshot menu item and save them out individually, but of course that doesn't help you (the boring reason you can't do it via snippets is that the GUI framework provides the .png writing abilities, which isn't available to the core emulation / snippets code. It may be something I look at in a future version, but since .gifs are lossless when capturing Spectrum screens it's not been a high priority.)
Yes, the .gif files will be saved without a border. There's an optional 2nd parameter to inks.save_gif() that controls whether a border is included. By default it isn't, but if you later decide you do want a border, just change the save_gif line to
Code: Select all
inks.save_gif(path,true)
- Gears of Games
- Drutt
- Posts: 43
- Joined: Sun Nov 12, 2023 9:13 am
- Location: Lalaland
- Contact:
Re: Emulator with screenshot button
OK, no problem. This is still a time saver for me. I can batch convert the GIFs in XnView or Photoshop. Will give this a stab tonight!
- Gears of Games
- Drutt
- Posts: 43
- Joined: Sun Nov 12, 2023 9:13 am
- Location: Lalaland
- Contact:
Re: Emulator with screenshot button
It worked perfectly! No problems and my old coding/scripting rash didn't even flare up at all! Thank you for your help!
Re: Emulator with screenshot button
Brilliant! No problem