20th December 2010, 10:17 AM | #1 |
Senior Member
Professional user
Join Date: Dec 2003
Location: UK
Posts: 369
|
Auto Save to Time
Would like ot see and auto save with the following options:
1. time, in minutes, from 5 to 30mins 2. filename with auto number This would reduce the number of times I screw up on files and models.
__________________
Regards, Gerry "Mossie" Mos -------------------------------------------------------------------------- WW1 Aircraft Library http://ww1-aircraft.info/ Mossie 3D CAD, "Prompt and Precise" http://mossie3dcad.com/ |
31st December 2010, 03:19 PM | #2 |
Senior Member
Professional user
Join Date: Dec 2003
Location: UK
Posts: 369
|
Re: Auto Save to Time
Anyone like to write a script to do this? Is it possible?
__________________
Regards, Gerry "Mossie" Mos -------------------------------------------------------------------------- WW1 Aircraft Library http://ww1-aircraft.info/ Mossie 3D CAD, "Prompt and Precise" http://mossie3dcad.com/ |
14th June 2013, 04:45 PM | #3 |
Junior Member
Member
Join Date: Apr 2005
Posts: 13
|
Re: Auto Save to Time
Is there anything like this yet? I just lost an hour's work, grrrrr. My own fault, I know but I was so happily working away...
|
17th June 2013, 12:17 PM | #4 |
Senior Member
Professional user
Join Date: Feb 2004
Location: Portland, OR
Posts: 604
|
Re: Auto Save to Time
I'd think the people who do plugins regularly could spit this out in just a few minutes. Me, I'm code clueless....
How's it going, Clip? (waves)
__________________
Flight Sim Project Contributor My Gaming Rig: i5 2500K Quad-Core CPU at 3.3GHz MSI P67A-C43 mobo 4GB of PC12800 DDR3 memory Windows 7 1GB Galaxy GeForce GTX550 Ti video card GeForce 270.61 drivers (4/2011) Cougar joystick/throttle combo CH Pedals |
20th November 2013, 12:17 PM | #5 |
Junior Member
Member
Join Date: Aug 2013
Location: London UK
Posts: 22
|
Re: Auto Save to Time
Save this script as auto_save.tcl in <ac3d_dir>/scripts.
Code:
namespace eval asave { # Autosave implementation variable nsave 0 ;# count number of saves for file name. proc auto_save {ms} { # if a model is loaded, save version N, repeat after ms millisec global nsave global unsaved_changes global acfilename ;# last saved file name if {$unsaved_changes} { incr nsave set orname $acfilename set fname [file root $acfilename]_${nsave}.ac puts "Save $nsave as $fname" set acfilename $fname menu_save_last set acfilename $orname } after $ms "eval asave::auto_save $ms" } asave::auto_save 60000 ;# 60000 = 1 minute. # puts "Autosave start" } Will only make a backup if a change is detected (the changes which cause 'changes made do you want to save' on Exit). Makes a save every minute if there is a change; replace 60000 with 10000 if you want to fill up your disk quickly. |
21st November 2013, 04:07 AM | #6 |
Senior Member
Professional user
Join Date: Dec 2003
Location: UK
Posts: 369
|
Re: Auto Save to Time
Thank you very much works as stated. A nice addition to the tool box. No longer will changes be lost.
__________________
Regards, Gerry "Mossie" Mos -------------------------------------------------------------------------- WW1 Aircraft Library http://ww1-aircraft.info/ Mossie 3D CAD, "Prompt and Precise" http://mossie3dcad.com/ |
15th February 2020, 07:25 PM | #7 |
Member
Expert member
Join Date: Nov 2010
Posts: 79
|
Re: Auto Save to Time
I have no idea how to write scripts... but I was able to figure out how to change the posted script into an "auto save" that just overwrites the open file every 5 minutes.
Code:
namespace eval asave { # Autosave implementation proc auto_save {ms} { # if a model is loaded, save version, repeat after ms millisec global unsaved_changes global acfilename ;# last saved file name if {$unsaved_changes} { set orname $acfilename set fname [file root $acfilename].ac menu_save_last set acfilename $orname } after $ms "eval asave::auto_save $ms" } asave::auto_save 300000 ;# 60000 = 1 minute. # puts "Autosave start" } |
|
|