OnPreQuit shows a user-configurable message during the computer's shutdown process.
Copyright © 2021 David Higton
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License version 2 along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
You may contact the author:
by e-mail as firstname.lastname@example.org, or
by snail-mail at 13 Graham Drive, Disley,Stockport, SK12 2JJ.
This application should work on any RISC OS computer from version 3.1 onwards, although it has only been tested with RISC OS version 5.29.
When shutdown is initiated, RISC OS broadcasts a PreQuit message to all tasks, to allow them to request the user's permission to save or delete files, for example. The OnPreQuit application uses PreQuit to delay the shutdown process while a message is displayed in a window. Shutdown continues when either the user clicks "OK" on the window, or the application times out - by default this is 5 seconds.
• Copy the !OnPreQuit application into a convenient location. I recommend the $.Apps directory.
• In the computer's Configuration, use Boot -> Run to run OnPreQuit at startup.
• To customise the message to be shown on shutdown, open the !OnPreQuit application by shift-double clicking it, then edit the !Run file by shift-double-clicking it. The message is obvious. Save the edited !Run file and close the application.
• The timeout is, by default, set to 5 seconds (500 centiseconds). This can be altered in the !Run file.
If the application was already running when the edits above were made, they will not take effect until the application is quit and re-run. OnPreQuit will not allow more than one instance of itself to be run, so just double-clicking the application is not enough - use the Task Manager to quit the existing one (the window opens with the old message, but it does NOT shut the whole computer down), then run the application again.
You can download OnPreQuit here.
0.01 2021 September 3 First issue
Page last updated 2021 September 3