Just remembered - don’t see check for Base in new code. Quick check - soffice didn’t work.
[LibO 5.1.5 on debian 8.5] writer close without asking to save, in need of an AUTOMATIC Incremental saving function
I’ll check and make sure to include it. I have another error to fix, if Basic IDE is open but the document has been closed it thows an error, need to check the URL property exists.
Updated attached document to v1.1 to fix the issues in recent comments.
Just checked v1.2 on xubuntu.
soffice doesn’t. Edit: Just added Openoffice v4.0.1 to xubuntu (was on Mint only before). Your v1.2 now works OK. However, use of soffice doesn’t. It kind of makes sense - both LO and AOO have an soffice.
If you try and run just soffice from a command window then it doesn’t work unless you change directory to the program folder. When you run from the Shell command then LibreOffice and OpenOffice both set the working directory to their own program folder, so the macro should work on both with only soffice in the shell command.
soffice from Shell does not work (on both LO & AOO) unless I put the full path into the macro. The initial Bash command starts and once the timer completes the cycle ends. Put the full path back in and it all works fine. Edit: Just now downloaded your document to make sure I wasn’t using wrong code. Same results.
Strange, I just tried again in Virtual box and I just type soffice from console and it runs LibreOffice. I might have set execute permission on soffice. Is there an equivalent of environment settings for paths to search for executables. Long time since I spent much time on Unix.
After some investigating here is what is. soffice DOES work in AOO but not LO (another error by me probably). As from the terminal, soffice is a shell script in /usr/bin which then resolves the installation directory (and a few other things). soffice is for AOO and starts it from the terminal. The equivalent for LO is “libreoffice5.2” and that works in the macro and from the terminal. But that still means that depending upon the LO version as to which command to use. Is that clear?
This makes sense that when soffice was used in LO, nothing was running in AOO so the cycle ended.
Saw you post and response. This works for LO but not for AOO (slightly different return). Of note -
"$(inst)" and I’m sure you realize you must strip characters from the return string.
I think I have it working for both LO and AOO using
$(prog) in Virtual Box on linux mint. I’ll test on windows and then post the update.
Did quick test on Xubuntu and LO and AOO work well. Good work.
I’ve been playing with this since this question arose and the last post noted by @mark_t . You can set up a timing loop.
Please refer to @mark_t answer for code.
I tested with xubuntu 16.04 and Mint 17.03 and seems to work without problem for Writer. Above posted code remains for reference only.
Old code and comments removed as they were outdated.
Also note the change I made to TimedAutomaticBackup in case the file is no longer open or if LO has been closed.
@mark_t thank you, got your change. Just tested in xubuntu with no problems after getting shell location correct. Only OS left is Mac or maybe some non-Ubuntu based Linux systems (most should be OK).
If you have time could you check if an external batch file can be avoided using bash, as this seems to work ok in windows. I included what I think is the correct code in my last edit, just need to change from false to true in the if statement.
I know this comment is not apparent, but anyone getting to this post directly should know there is an additional function available for this process. It allows the user a choice of the number of backup copies to be retained. There is also notation on how to place each different files’ backup in a separate subdirectory. Please see my answer in this post - click here.
I never think about saving my work till the end of the day, and I won’t begin, as it’s not my job.
Sorry, but it is your job. When I took computer classes, back in the eighties, we were told that we were to save our work every fifteen minutes or so, to keep loss of work as a result of a power cut or computer crashes to an acceptable minimum. Until there’s an inbuilt way to auto-save your work every 15 minutes, it’s up to you.
Sorry but for sometime now, since the eighties, word processors have an autosave function that saves the current file, in place, every how ever many minutes you want.
This is a feature so often requested but it is always dismissed. It is the one reason I go off in search of other word processors for Linux. On Windows I will use Word – which does have this feature – but I like to spend most of my time in Linux.
The eighties was a long long time ago. I was in computer school about that time and have come to expect better.