Author Topic: Script to delete Save State (.sta) file? Windows  (Read 1958 times)

spedinfargo

  • Newbie
  • *
  • Posts: 5
    • View Profile
Script to delete Save State (.sta) file? Windows
« on: January 29, 2019, 04:57:34 AM »
Hi - just starting to look into how custom commands work with Attract Mode.

I would like to create a custom script to delete the Save State file for the currently-selected game (Mame emulator).  The actual script would be pretty simple:  just grab the currently selected item, execute a windows "del" command on the \mame\sta\<name>\auto.sta file.

I see in the Configure/Controls menu there is a "Custom1" "Custom2" etc. that you can map to a key/button, so I'm assuming that's part of the puzzle.

Any thoughts on if and how this can be done?

Thanks...

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Script to delete Save State (.sta) file? Windows
« Reply #1 on: January 29, 2019, 05:01:30 AM »
You can create a user config to select a custom key. People might have another plugin that uses a custom key too.

Your probably going to want to implement some sort of confirmation. Run cmd in background.