Is there a way to script Microsoft Word to save all open documents automatically? - ms-word

My father can't seem to shutdown his computer, ever, so I'm using Task Scheduler to have it automatically power off every night. Thing is, he also can't seem to save his documents, so I need to make sure every open document has it's changes saved when it shuts down. Is it possible to do this using AutoHotkey, VBA, or with some MS Word feature I'm not aware of?
I'm aware of the AutoRecover feature. But, as I understand it, that just saves a copy in another folder that gets thrown away when the document is opened again. It's not as reliable as a manual save.
Any help on this is appreciated. It physically hurts to watch tech-illiterates abuse their PCs.

Related

Avoid multiple instances of QGIS on a shared drive

Is it possible to prompt an error/warning box when opening a QGIS-file that is already opened by another user on a shared drive?
At work we are using QGIS to more and more tasks meaning more and more people are using the different QGIS-files. We are starting to see an issue of multiple people opening the same QGIS-file at the same time and are making changes. My thougt is that ot would work the same way AutoCAD, Word, Excel and other programs work where when you attempt to open a shared file that is already opened by another user, you will be warned. Often you will be able to open a "read only"-version but that won't be neccesary in QGIS, in my opinion. It will be sufficient to be advised that the file is already open in another instance in some form of dialog box.
Anyone having had the same issue and perhaps have come up with a solution?

How to periodically 'touch' temporary files on remote server so the files don't get deleted

I log on to the remote server using SAS/Emacs. On the server, there is this space where I can save files for about a week. Unless I refresh or 'touch' those files again, they will get deleted after a week. Is there a macro or a code that I can execute whenever I open SAS/EMACS so that these files stay updated?
So far, I have used SSH to go on to the server and type 'touch /*' to keep it 'touched', but I am hoping there is a better/more efficient way to keep those files touched.
Assuming you're using EMacs Speaks Statistics to connect to SAS, then you have a couple of different options.
One is to modify ess-sas-submit-command to point to a script that first does your "touch" command and then starts SAS.
Another is to create an autoexec for SAS to do that for you, assuming you have rights to do so; you can add that to various locations in Unix or to the command line itself (depending on how you're launching SAS).
Even if you're not using ESS, the Autoexec method may work for you.
Note that, of course, your system administrator may not appreciate doing this, so do make sure this is permissible (unless that sysadmin is you!).

Microsoft word opens every document when I click the application

For some reason, when I click to open Microsoft word or go to open any documents that would cause Microsoft word to open, every word file that is on my computer starts opening and my Microsoft word immediately stops responding but continues to open every document. Does anyone know why this occurs or knows how to fix it?
I had this once: when Word crashed and I restarted it, it would open whole bunch of documents. I figured it happened because I never actually closed the Word itself, only closed the current document (while the Word application itself kept running), so when Word finally restarted after crash, it reopened all documents that were accessed since the previous start of the application.
As far as I remember, I used "brute force" approach to deal with the problem: I let the Word open everything it wanted (which took a while - several minutes at least), and when it finally was done, I manually closed each and every opened Word file, then closed the Word itself, restarted it and it was fine.
Oh, one more thing: all of that was happening on Mac, but I don't think it makes a lot of difference.
Hope that helps!

Script that runs itself every now and then

I work in marine systems institute. We have a buoy that sends information about the sea every few hours to a central computer in the institute. It drops it as a .txt file in a certain folder. It would be really great if I could make a script that looks into that folder every 3 hours and checks if there are any new files. If there is a new file, it should upload it to an ftp.
I have no idea where to start. Are there any suggestions what language, where to look, what to search etc.
The computer is running 24/7 and the script can easily be an executable that is active all the time. The script doesn't have to restart itself every time, it can be up and running 24/7 also.
Thanks in advance
EDIT1: My op.sys is windows
If your platform is Windows, I suggest Windows Forms Application. An IDE is available, Visual Studio - it is easy to use and has everything you need for your application. You basically need a timer object that will execute a function (checking the file) in a certain interval. 3 hours is long enough, you can even check it every 5 min.
AutoHotKey can be learned by anyone in a day, and is powerful enough to do what you describe.
A program written in a real language could do exactly what you like with full customization, robustness, portability, and maintainability, but will take quite a bit longer to make.
It might be a little over your head if you never done any programming(Forgive me if you have).
A good solution is to use FileSystemWatcher http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx. Then create a windows service to run it.
But again that takes some experience implementing.
Try using an ftp client such as smartftp which can watch the folder where the files are created, and automatically upload them.

Making and Interfacing with Custom Services

I've been searching for this for awhile now, and I am not sure if I am just not using the correct search terms or if the answer is really that hard to find.
What I am trying to do is to create a new Windows service for a game server from a batch file, and then have a task run another batch file every 30 minutes or more that would run two commands on the game server's command line and do some file work.
Specifically, I am running a Minecraft server using Bukkit for a gaming community I help run, and I want to make sure that the thing is always up unless I specifically tell it to stop (like a service). Bukkit is run directly from a batch file and has it's own command line thing running on it.
I am told that you CAN run this type of thing as a service, but the command line will be hidden from view and/or interaction. This is the second part of my query. I have a handy little backup.bat file that copies all the world files and userdata files into a backup directory, 7zips it, and deletes the directory. The only thing is, is that Minecraft likes to always have the worlds' region files open and writing at all times, meaning that it could cause map corruption if I just run it straight off. To compensate, I need to run the command "save-off" on the server to disable the file hooks temporarily, run the backup, and as soon as it finishes, run "save-on" so that the game can continue without lost data.
What I would like to know about this second one is, is it possible to interface with the game service through a batch file, or do I need to create an application to do that? If the latter, how exactly does one go about doing that? I have moderate C++ knowledge (up through my second OO-C++ course in college), and can possibly learn another language if absolutely necessary.
So, in short, two questions:
1. Is it possible to, and how to run a BAT file as a Windows Service?
2. How to interface with said service via BAT files, and if not possible, what kind of application do I need to write (redirection to or writing a tutorial works for me).
Thank you in advance for any and all help!
Old question, user account doesn't seem active on SO anymore, but hey, if you stumble upon this because you have a similar problem:
Since we are speaking about a Bukkit Minecraft server, turn to the "Essentials" plugin for Bukkit.
It now includes a Backup function that does exactly what the OP asks for, namely stop the save so the files can be manipulated without corruption, launch a script, then starts again.
The script can be a backup one (examples provided in the linked page) but can be used to run any operation on the world's files.