1. #1
    Member Follow User Gallery
    Join Date
    Jan 2007
    Location
    Paramount
    Age
    36
    Posts
    32

    Default How to do incremental saves?

    Hello all I have been searching for the last few hours and I can not figure how to make incremental saves. I just want to have a button that just adds increments to the end of the file name. ex. "filename"_01 then on next save "filename"_02. Will I have to save the file name as a variable then add the numbers on the end? If so how do I do that? Thank you for your time!

  2. #2
    Senior Member Follow User Gallery
    Join Date
    Aug 2011
    Location
    Mebane, NC
    Posts
    4,194

    Default

    I'm afraid you'll have to use ZScript. It can be done.
    There could be a built in function(but isn't other than by QuickSaves) like I've seen before in some dialog boxes...

  3. #3
    Member Follow User Gallery
    Join Date
    Jan 2007
    Location
    Paramount
    Age
    36
    Posts
    32

    Default

    @Doug Jones sorry I should of been more clear I trying to figure out how to script that function in zscript. I have been messing around with the saves in zscript and can not seem to figure out how to script the incremental part.

  4. #4

  5. #5
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    You could use [FileNameAdvance] to increment the filename:


    [VarSet,fileName,"MyProject000.zpr"]
    [FileNameSetNext,#fileName]
    [IPress,File:Save As]
    [VarSet,fileName,[FileNameAdvance,#fileName,3]]//file name created for next save - "MyProject001.zpr"


    One thing you need to remember is that as only one plugin/zscript can be active at a time variable values are lost if you use a different plugin. So you'd need to think of how you can make sure the fileName isn't lost between your saves. One way would be to use [VarSave] and [VarLoad] to save the variable to disk. Or you could write the file path to a memory block.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •