Icon representing a recipe

Recipe: Quick Backup v1.0

created by man_the_stan

Profile


Name
Quick Backup v1.0
ID
108630
Shared with
Public
Parent
None
Children
None
Created on
April 05, 2024 at 18:59 PM UTC
Updated on
April 05, 2024 at 18:59 PM UTC
Description

Quietly saves a solution with an automatically-generated name that conforms to the name scheme used by the Auto Recover recipe ("AUTOBKUP__YYYY-MM-DD_Day_HH-MM-SS[__OPTIONAL-EXTRA-DESCRIPTOR]").
No interaction is required unless the save fails, at which point a popup dialog will alert you of the issue.

Best for


Code


-- QUICK BACKUP v1.0 -- man_the_stan solname = os.date("AUTOBKUP__%Y-%M-%d_%a_%H-%M-%S") tf, msg = pcall(save.SaveSolution, solname) if not tf then print("Error message:", msg) dia = dialog.CreateDialog("Save failed") dia.label = dialog.AddLabel("Failed to save the solution. See output for details.") dia.btn = dialog.AddButton("OK", 0) dialog.Show(dia) end

Comments