TimeStamp Backup

Discussions about using 3rd party extension with OpenOffice.org
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Post by Zizi64 »

Thank you, Gerhard.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Post by Zizi64 »

The 1.2.0 version of the timeStampBackup extension is downloadable from these sites:
now:
https://kovleventer.com/
http://flowcont.hu/LO_oxt_store/

in a few days:
https:// extensions.libreoffice.org/en/extensions/show/timestamp-backup


New features:
Managing the Backup files: the Open and the Delete function with some custom file filter options are available. You can find them in the File menu, under the TimeStampBackup menu item. (Tibor Kovács, Levente Kovács)
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
bobe
Posts: 1
Joined: Sat Apr 10, 2010 6:21 pm

Re: TimeStamp Backup

Post by bobe »

Thanks to everyone who contributed to this helpful macro.

I know it's long running thread, so I thought I might resuscitate it once more by asking: is there a way to have this macro run every few minutes so it will save a backup copy of what I'm working on ?

Thanks for any help.
OpenOffice 3.1 on Windows Vista
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Post by Zizi64 »

This extension was written in StarBasic (the common Basic dialect of the Staroffice, OpenOffice.org, Apache OpenOffice and the LibreOffice.)
The StarBasic not contain any built-in timer feature.

Maybe it would be possible to count the keystrokes: then the saving/backup interval will be proportionate to the "work done". The macro (as all of Basic macros which run often) will slowener the office suite.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
JeJe
Volunteer
Posts: 2764
Joined: Wed Mar 09, 2016 2:40 pm

Re: TimeStamp Backup

Post by JeJe »

There are the wait and waitUntil statements. WaitUntil would be perfect for doing something every few minutes - but unfortunately there's a problem when you close down the software because its not clever enough to realise that has happened and keeps running.

A do/loop with a shorter wait statement within and a condition to test if the suite has been closed (so to exit the loop) might work.

https://wiki.openoffice.org/wiki/Docume ... e_Library)

edit: fixed above link
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Post by Zizi64 »

There are the wait and waitUntil statements. WaitUntil would be perfect for doing something every few minutes - but unfortunately there's a problem when you close down the software because its not clever enough to realise that has happened and keeps running.
...And how can run other macro routines while the running one is not ended? I often use lots of macros. I can not launch more than one Basic macro in same time...

I think it is a partial solution for those prsons who not use (other) macros.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
JeJe
Volunteer
Posts: 2764
Joined: Wed Mar 09, 2016 2:40 pm

Re: TimeStamp Backup

Post by JeJe »

That's not a problem, the Wait statement yields - other macros can run at the same time that is running.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Post by Zizi64 »

I will try it.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
JeJe
Volunteer
Posts: 2764
Joined: Wed Mar 09, 2016 2:40 pm

Re: TimeStamp Backup

Post by JeJe »

This is my experimental code to look at this.

In OO, if the code is placed in the document macros and setexitloop is run on the document is to be closed event... there's a crash (unless the IDE window is open)
If setexitloop is run manually before closing it works - but that's inconvenient.
(In LO - there is no such problem)

If the code in placed in MyMacros, not the document instead it seems fine in OO though.

Code: Select all

Global exitLoop as boolean

Sub STARTTIMER

static c as long,lastticks as long,currentticks as long,doc
doc = thiscomponent
lastticks = getsystemticks
do
wait 100
if exitLoop= true then exit do
currentticks = getsystemticks()
if  currentticks -lastticks >= 1000 then 
if doc.currentcontroller.componentwindow.isvisible = false then exit do
doc.currentcontroller.frame.title = "save"  & c
c=c+1
lastticks = currentticks
end if
loop
End Sub

sub setexitloop
exitloop = true
end sub
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Rafkus_pl
Posts: 7
Joined: Wed Mar 23, 2022 7:29 pm

Re: TimeStamp Backup

Post by Rafkus_pl »

Hello, I am writing with the help of a translator, sorry for the mistakes.

Thank you for this useful extension, I translated it into my native language (Polish) and posted it on our forum: timeStampBackup_v1.2.1.oxt
I wish you good health, Rafał.
OpenOffice 4.1.6. and LibreOffice 7.1.6; Widows 10
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Post by Zizi64 »

Thank you for the translation. I will put the 1-2-1 version into our webpage.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
russelld
Posts: 2
Joined: Wed Apr 05, 2023 5:47 am

Re: TimeStamp Backup

Post by russelld »

Thanks for great extension!

How is it possible to map a keyboard shortcut to the TimeStamp Backup?
OpenOffice 4.1.1 on Linux x86_64 Calculate Linux 23
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: TimeStamp Backup

Post by Zizi64 »

You can do it in the Customize menu:

Tools - Customize - Keyboard -
...(scope): LibreOffice -
...Shortcut Keys: choose Ctrl-T (this key is free in my Hungarian LO 7.4.6) -
...Category: (Application Macros - MyMacros - timeStampBackup - timeStampBackup) -
...Function: timeStampBackup -
Button: Modify -
Button: OK

.
Assign_tSB_to_hotkey.png
Assign_tSB_to_hotkey.png (26.51 KiB) Viewed 5282 times
Last edited by Zizi64 on Wed Apr 05, 2023 8:40 am, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
russelld
Posts: 2
Joined: Wed Apr 05, 2023 5:47 am

Re: TimeStamp Backup

Post by russelld »

Hi Zizi64,

Brilliant!
Thanks for making it easy by showing how to do this with images!
OpenOffice 4.1.1 on Linux x86_64 Calculate Linux 23
Post Reply