AutoBackup

part of wslib


backups every move you make


AutoBackup creates a folder called "_Backup" inside your "~/scwork" folder. A copy of every open document is saved there and saved again after a key is pressed. This will save your work whenever SC crashes. If SC is quit the regular way AutoBackup will remove all backup files. Also as soon as a window is closed its corresponding backup file is deleted. This way, files are only kept if the SC app actually crashes or is force-quit.  This Class saved me a *lot* of work, especially with those nasty infinite loops one sometimes gets when coding.


It is wise to put a line "AutoBackup.start" in your startup.rtf file.


Backups are saved as .sc files, named after the title of the document.


Creation


AutoBackup.start

starts AutoBackup process. Creates the _Backup folder if not there


AutoBackup.start;


AutoBackup.stop ( deleteAll )

stops AutoBackup process. if deleteAll == true (default) deletes all backup files


AutoBackup.stop;


AutoBackup.show

show _Backup folder in Finder


AutoBackup.backupFolder

gets and sets the path of the backup folder


active

true if active


AutoBackup.cleanBackupFolder

delete all files in the backup folder (including leftovers from crashes)