Hi,
I want to code time-interval auto-save script, that doesnt save under the current file name, but with a _bak suffix. This was requested in #610 and #611.
I tried to follow the suggestion in #610, but the QTimer() in:
var timer = new QTimer();
is unknown, and the script doesnt run.
I've also tried to use
setInterval(foo(),timeout)
the script runs, but the timeout is ignored, and foo() is run immediately.
so my question is - how can i do a time-intervaled auto-call of my save function?
thanks.
Anonymous
You can use setTimeout
And you need to call registerAsBackgroundScript so the script continues running
thanks. the setTimeout and registerAsBackgroundScript worked well.
i posted the working script here Periodic auto-save all documents under a new name
Thanks. Well done!