WorkSpace  -  A superb desktop work organiser

by Graham Crow

Version 1.00

for RISC OS 3.10 or later

RISC OS 3 provides a convenient way of saving a !Boot file from the Task Manager's menu. However, there are a number of snags with this approach. The user has little control over the exact contents of the saved file, which can contain a good deal of unwanted material and take ages to execute. Having saved the file, it is extremely difficult to make minor changes, such as adding a couple of icons to the Pinboard, without at the same time altering parts of the file which you wanted to preserve! Moreover, there is no easy way of changing the state of the desktop after the initial boot-up.

RISC User has published several attempts to solve some of these problems in the past, including applications to allow alternative !Boot files to be applied on start-up, to suit different jobs or different users. However these methods involve a certain amount of fiddling with the boot file structure (which with the Risc PC is very complicated), and they do not allow for changing the desktop during a session.

What is wanted is an initial Boot file which contains the absolute minimun the user always requires so that it will run as rapidly as possible. We then need a simple means of configuring a number of different environments, any one of which may be invoked at any time with a single click.

Enter WorkSpace!
WorkSpace provides a solution to the above problem. You can configure up to twenty separate 'workspaces', and each workspace can specify Objects (files, applications, directories), Pinboard configuration, filer windows and screen mode.

Objects are specified simply by dragging them onto WorkSpace, and files may be designated for loading into specified applications. Pinboard, Filer and Mode switches save the current status of each. A workspace is run by just choosing it from a menu or clicking on an Execute button.

It's as easy as that!

Creating the initial !Boot file
The best way to do this is to use a text editor to construct your own !Boot file which should contain only those essential commands, probably of the form:
	Run ADFS::HD4.$.Apps.!Zap

It is recommended that you include WorkSpace among the (few) items in your Boot file. 

It is also worth saving the !Boot file from the Task Manager's menu, into a convenient directory so that it can be examined in an editor. You may be persuaded from this to include such lines as:
	RMEnsure VProtect 0
			RMRun System:Modules.VProtect
	Set Alarm$Options -timeout "10" -weekwork 62
			-format "%z12:%mi %zdy/%zmn"
	Run Resources:$.Apps.!Alarm

Keep only the minimum you require, give the file a filetype of Desktop (&FEA), and save it to the correct directory. For example, for the Risc PC this is:
	ADFS::HD4.$.!Boot.Choices.Boot.Tasks.

Re-start your computer to check that the initial !Boot file acts as intended.

Starting WorkSpace
Launch the application in the usual way by double-clicking its icon. This results in the icon appearing on the icon bar (to the left of the Display Manager if you're using a machine fitted with RISC OS 3.5 or later). As explained below, you can configure WorkSpace so that the icon is affixed to a corner of the screen rather than taking up space on the icon bar.

The main window
Click Select or Adjust to open the main window. This window contains two tabs, Select and Create/Edit, whose purpose is described shortly. At first, the Select tab applies.

Beneath the tab is a scrolling window, initially blank, with space for up to twenty workspace descriptions. Only the first workspace is available, and this is selected as shown by the darker background.

Below the scrolling window are four option buttons, Objects, Pinboard, Windows and Mode, all of which are initially set.

Finally, the current workspace number is shown together with a single button: Execute.

At this stage there is nothing to execute! So click on the Create/Edit tab.

Create a workspace
In Create/Edit mode there is provision to drag up to thirty objects (files, applications or directories) to the Object column.

If the object is a file, you may wish to load it into a specific application, in which case you should drag the application to the corresponding slot in the Load to (app) column. Only applications may be dragged onto this column, and naturally they must be appropriate for the associated file. For example, you might want to force a sprite file to load into ChangeFSI or PicAPic rather than its 'natural' host, Paint. If you do not specify an application, then the natural host will be selected as if you had double-clicked on the file in a filer window.

As you drag an object onto the window, the option button to the right of it is set. These 'flags' may be clicked on and off, and are useful for temporarily preventing an object from being executed. Their state is saved with the object data.

If you make a mistake, you can delete an entry by clicking on its CE button. If gaps occur between the entries, you can ignore them as they will be closed up when the workspace is saved. However, you can move an object to a new position in the list simply by dragging its number and dropping it on the required position. The other entries are moved up or down to fill the gap. The position determines the sequence in which the objects are executed, and hence the position of applications on the icon bar.

Next, enter a description for your workspace (up to 25 characters).

Aspects of the workspace may be saved selectively. If you want to save the Pinboard, filer windows or screen mode, then you need to set up the current desktop in exactly the way you want it. Enter the required mode, get rid of any unwanted icons from the Pinboard, and pin those you require in the desired positions. Similarly, close any unwanted filer windows and open those you require at the correct position and size.

Finally, set the options buttons for those aspects you wish to save, and click on Save to save the data to disc.

The Save settings button allows you to save only the flags and options. This is useful if you later make a temporary change (maybe you just want to save the position of a filer window) and then want to restore the buttons to their former state.

When you make any change to data while in Create/Edit mode, an asterisk appears in the window's title bar. If you then try to return to Select mode, or to quit WorkSpace before saving the changes, a window opens allowing you to Discard the changes, Cancel the proposed operation, or Save the changes. When saving from this window, you can set the options as usual.

Important note about task names
In order to verify whether a task is currently active, and also to load a file into a specified application, it is necessary for WorkSpace to be able to identify the task name (as displayed in the Tasks window) from the application's filename. Normally these are the same, or very similar, but if this is not the case (for example a taskname has a space in it or is longer than nine characters) then these facilities will not work as intended. To overcome this, each time WorkSpace is launched, it looks in its User directory for a file called AppNames and builds a name translation table. By editing this text file, you can add items to the names translation table, up to a maximum of 50 names. The format is: <filename>:<taskname><LF>.

Note that prior to RISC OS 3.5, the name in the task manager had a maximum of 19 characters, e.g. Impression Publisher would be "Impression Publishe", but from RISC OS 3.5 onwards, the name can be longer (i.e. "Impression Publisher"). This AppNames file is currently set up for use on RISC OS 3.5 or later.

Create/Edit menu
The menu associated with Create/Edit mode contains four entries:

File '*': if you click Menu over an object, the object name appears (otherwise this entry is greyed out). The submenu allows you to slide off Pathname to view the full pathname of the object. Sliding off Command reveals the command which normally governs the particular object (e.g. Filer_Run), and choosing this runs the individual object.

Clear all clears all the entries if you want to start afresh. Note that if you do this by mistake, you can retrieve the data by choosing Refresh before saving.

View data opens the User directory.

Refresh reads and displays the data for the current workspace again.

The User directory
Data is saved within WorkSpace in the User directory, which may be opened from the menu. There are four sub-directories:

Misc contains a text file for each workspace with the description, options and mode specifier.

Objects contains a text file for each workspace with the flags followed by the pathname of each object. If the object is a file, and a target application has been specified, then a '\' precedes the file specification.

Pinboard contains an Obey file for each workspace specifying the Pinboard icons (path and position).

Windows contains an Obey file for each workspace specifying the filer windows (path, position, size and properties).

If, for any reason, you edit any of these files directly, you can force WorkSpace to re-process the data by choosing Refresh from the menu.

There are also the text files AppNames, Choices and Exceptions which are explained elsewhere in this help file, together with an application, KeyTest, to help you identify the key code if you want to specify an alternative hot key.

Execute a workspace
Once you have created your first workspace, return to the Select mode. The description now appears in the first slot, and the second slot is available for selection.

You can now click on the Execute button to activate the selected workspace. The execution is selective and depends on the option settings. If Objects is set, then the chosen objects are executed in order according to their filetype. The command for applications and files is Filer_Run and for directories is Filer_OpenDir; (this is the same as if you double-clicked them in a Filer window). The order also determines the position of their icons on the icon bar. To prevent individual objects from being executed unset their flags. Applications are only launched if they are not already active (but see the section on Task Names).

If Pinboard is set, the current Pinboard is cleared and the new one substituted, including the backdrop.

If Windows is set, any windows currently open are closed before the specified ones are opened. However, you can prevent current windows from being closed by clicking on Execute with Adjust. Moreover, there is an Exceptions file in the User directory in which you can specify any task whose windows you want left open. The task name must be the full name as shown in the Command window. For example, on my system I protect my program MenuBar.

If Mode is set, and the specified mode is different from the current one, then a mode change is initiated.

You can execute a workspace from either tab mode. This makes it easy to test a new workspace before returning to Select mode. Normally, the WorkSpace window closes after execution, but you can force it to remain open by holding down Control while clicking on Execute.

To create each new workspace select the empty slot at the end of the list, enter Create/Edit mode and proceed as described above. Alternatively, select or copy a workspace you have already created (see below) and enter Create/Edit mode to amend it.

Short-cut to executing workspaces
When you have created and saved a number of workspaces you will, for most of the time, simply want to choose and execute workspaces as required. To do this you do not need to open the window at all. Just click Select on the icon and a menu appears listing all the defined workspaces for you to choose from. The settings are read from disc. Of course, if you want to vary the settings you will need to open the main window, which you can do by clicking Adjust on the WorkSpace icon, or pressing the defined hot key (see Choices).

Move, copy and delete workspaces
To move a workspace to a new position in the list, simply drag its number and drop it on the required position. The other entries are moved up or down to fill the gap.

To copy a workspace for subsequent editing and renaming, drag its number and drop it on the vacant slot at the end of the list.

To delete a workspace, click Menu when the pointer is over the required workspace description, slide off the menu entry and choose Delete.

Select mode menu
There are three entries:

Workspace n: if you click Menu over a workspace, the submenu allows you to delete the workspace from disc.

View data opens the User directory.

Refresh reads and displays the data for the current workspace again.

Icon menu
The icon menu has two entries in addition to the usual Info and Quit options.

Choices leads to a dialogue box in which certain aspects of WorkSpace's operation may be configured (see the section on Choices). Clicking on Choices instead of sliding off it allows the window to stay open until you specifically close it.

Kill tasks leads to a sub-menu listing all the current application tasks so that you can select and kill them rapidly (see the section on Kill tasks).

Choices
Yoy can choose to have the icon affixed to a corner of the screen rather than placing it on the icon bar. This avoids taking up space on the icon bar, and prevents the need to scroll a full bar to find the icon. Just click on the square representing the required position, and the change is implemented immediately. If the icon should become obscured, you can toggle it between front and back by pressing Shift+F12 (which also toggles the icon bar).

By default the main window does not open when you start WorkSpace. However, you can change this by selecting Open on start-up.

As a convenience, you may specify a 'hot key' to open the main window. The default is F1 (&181), though you can change this if you wish. A utility called KeyTest is included in the User directory to help you identify the key codes. If you do change the key, do also change the description of the key in the second writable icon so that you will remember it!

In order for the hot key to work, it is necessary that no other task has the input focus. One way of achieving this is to click on an editor to open a new window and then close that window. Now holding down Ctrl and pressing the designated key will open the WorkSpace window.

Kill tasks
The Kill tasks menu lists all the active application tasks (note: not module tasks). This provides a handy way of killing off unwanted tasks rapidly by choosing them from the menu. Tasks with unsaved data are allowed to complain before being killed.

To kill a single task, choose it with Select. The menu closes and the task is killed.

Clicking on a task with Adjust toggles a tick on and off. A selection of ticked tasks may be killed in one go by clicking on Kill selection at the end of the menu.

Object not found
If you move or rename an object on your hard disc, and that object is part of a workspace file, then the filer will issue an error message for each such object when you execute the workspace. The solution is to identify the offending objects by examining the files in the User directory and then edit them either directly or through the Create/Edit facility. Don't forget that the file may be specified in the Windows or Pinboard directories.

Hints and tips
Some text editors allow you to alter their template files so that their window opens at a particular size and position. This can give rise to a precice layout avoiding overlapping windows.

By closing all filer windows and saving just the Windows option, you can create a workspace called Close all windows which does just that if you execute it (unless, of course, you have placed their task name in the Exceptions file).

By entering a given mode and saving just the Mode option, you can create a workspace called, for example, Mode 1280 1024 16 and another for, say, Mode 1024 768 256 and then toggle between modes by clicking on Execute.

You can create Obey files for inclusion in individual workspaces as appropriate, and they will be run when the Objects part of the workspace is executed. For example:
	ChangeDynamicArea -RamFsSize 1200K
would set up a RAM disc of 1200K.

You could use a workspace to include a group of files or applications, not necessarily for executing all at once, but for individual access as required, using the Command menu in Create/Edit mode.

You will probably discover lots more uses!

	Graham Crow
	Crow Associates
	Manor Lodge
	Llangattock
	Monmouth
	Gwent NP5 4NG

	Phone & Fax: 01600 772532
	Email: gmcrow@argonet.co.uk

Copyright  Crow Associates 1996