Take a screenshots with custom path, rom name & date

By modhack

Supporter (4)

modhack's picture

18-09-2023, 10:11

Hello,

I'm looking for a way with a TCL Script to bind a key to take a screenshot with a custom path and automatically grab the rom name and date. Any idea?

Login or register to post comments

By Manuel

Ascended (19676)

Manuel's picture

18-09-2023, 20:59

The path is always the same?

By Manuel

Ascended (19676)

Manuel's picture

18-09-2023, 23:04

Unfortunately, due to technical reasons, it's not easily possible to query the current date from Tcl scripting in the openMSX installation.

But you can easily generate a screenshot (and then look at the file date) with a custom path and ROM name. For example:
bind F6 {screenshot [utils::get_next_numbered_filename /tmp "[guess_title] " ".png"]}
where I hardcode my screenshot path to /tmp .

Try it a bit and tell me how that works.

By modhack

Supporter (4)

modhack's picture

19-09-2023, 18:44

Thanks, I will try it. YES the path will be the same. We integrated OpenMSX into Batocera.Linux distribution and the screenshots folder is the same for all systems.