Could someone please edit this so that while I am editing boxes, it will autosave to the text file when changes are made.
txtFile = "C:\Users\YourName\Desktop\boxInfo.txt"
if doesFileExist txtFile then
theFile = openFile txtFile mode:"at"
theFile = createFile txtFile
fn print_data_to_file obj=
format "\n\n%\n%\n%\n%\n%\n%\n%\n%\n%\n%\n" obj.name obj.length obj.width obj.height obj.position.x obj.position.y obj.position.z \
(obj.rotation as EulerAngles).x (obj.rotation as EulerAngles).y (obj.rotation as EulerAngles).z to:theFile
for theBox in $Box* do print_data_to_file theBox