Autosave and version save
Posted: Mon Jul 14, 2014 7:46 pm
Fairly new to livecode after using app Inventor and have been looking for autosave feature and a way of saving versions of app as build progresses.
Have been playing around with this code and it seems to work when stack is opened. Am now playing with making a timed save occur. I am guessing there is something out there (revSmartSave works but over writes last save). I plan to place this in every stack I build. Or maybe I should make a plug-in???
Saves with name of stack and reversed date/time so files are saved in order.
Would appreciate any comments as being a noob (kind of) not very sure about what i am doing and need all the encouragement I can get!
Have been playing around with this code and it seems to work when stack is opened. Am now playing with making a timed save occur. I am guessing there is something out there (revSmartSave works but over writes last save). I plan to place this in every stack I build. Or maybe I should make a plug-in???
Saves with name of stack and reversed date/time so files are saved in order.
Code: Select all
function reversed theString --reverses date to give file name which is in sequence
repeat with thisItem = the number of items of theString down to 1
put item thisItem of theString after reversedString
end repeat
return reversedString
end reversed
command autosave --autosaves with file name tagged and dated.
lock screen
put the system date into tDate
put the system time into tTime
replace "/" with "," in tDate
replace ":"with"" in tTime
get reversed(tDate)
put it into tDate
save this stack as "E:\selected folder\"&"MeicaReboot"& tDate&tTime&".rev"
unlock screen
send autosave to me in 600 seconds
end autosave
on openstack
##set the Text of field "lblCopyrightChar" to numToChar(0169)
autosave
end openstack