Index  |  Applets  |  Templates  |  Resources  |  What's new

Applet related

Abbreviation applet
Applets deactivating
Automatic palette applet window opening
Finding applet version
Index applet chapter template for index

Return to complete hints and tips index

Q :– If you have an abbreviation, sa expanding to said, for example, and follow the abbreviation with a comma or a full stop then it expands fine. But if you put an apostrophe after it, it doesn't. I'd like to be able to able to type something like "pe" to expand to "Peter" (which is fine) but sometimes type "pe'" to expand to "Peter'" to which I then add "s" (or "d")
Easy to do. You need to make the following changes to the file !OvnPro.Applets.!Abbrev.Library.Abbrev. (Make a copy of this file into another directory first, in case things go wrong. It must be in another directory, or OP will try to load it and complain.)

(1) Find the lines in function abbrev_fix() which read:

// check if key is 'space', 'new para', 'tab', 'new line' or 'new page'
if (key == 32 || key == 13 || key == 394 || key == 2061 || key == 6669)

and change the lower line to read:

if (key == 32 || key == 13 || key == 394 || key == 2061 || key == 6669 || abbrev_ispunct(key))

(2) Then add the following lines near the top of the file, after the line which starts 'string abbrev_path=' and before the definition of function abbrev_readdata():

int abbrev_ispunct(int c) { return "!'?.,:;/\""/chars(c)+1; }

The stuff in the quotes consists of a list of punctuation marks which you want to be able to trigger abbreviation expansion. If you want the plain double quotes to be included, you need to prefix it with a backward slash.

Q :– Is there any way of altering the abbeviation applet so that it does not necessarily add a space after the word, (even though you have to press the space bar to activate the word)?
In the file Abbrev inside the applet change
type("{Deleteb}" * l + s);
{type("{Deleteb}" * l + s);if(key==' ') key=-1;}

Q :– I have several abbreviations set up to avoid repeated typing of often used phrases. Most of them occur mid sentence and are therefore followed by a space. The problem is the applet also produces a space so I end up with two. Is there a way of avoiding this?

Check your !Abbrev.abbrevs list for end-of-line spaces, and if you have some then remove them. That should cure your problem.

Q :– How can I find out which version of an applet I have?
Open the Ovation Pro directory, by double clicking with SHIFT held down. In there you will find a directory Applets. Open this directory, and you should see all your installed applets. Open the directory of the applet of interest by double clicking with SHIFT held down. One of the files therein is !info. Examine this file in a text editor. The first two lines of this file are of the form
This means the applet is version 1.02

Note for the unwary. If the number after minorversion consists of only one digit, then a zero will be automatically placed in front, so the example given is for version 1.02. If, instead the minor version was 23, then this would be interpreted as version 1.23.

Q :– I lost the use of Applets I had installed. It seems that any turned-on Applets get turned off automatically as Ovation Pro installs on the icon bar! I can watch the Applets in a filer window as I launch Ovation Pro. As it installs on the Icon bar any that are on get a - added as they are all turned off!

This is because the !ARun files from inside the applets have gone missing. It is the presence of the (often zero length) !ARun file which denotes an applet which is loaded from something else which is run. And if you run an applet, it toggles it's on/off status, just as it does when you double click on it.

Q :– How do I prevent the 'Ovation Pro Styles', 'Page Palette' and 'Cols' windows being opened automatically?
Usually they have a variable in the main !Applet.Library.Script file that you can change the initial value of.

int colpal_palette = 1;
Change the 1 to a 0.

int pagepal_toolbox = 1;
again change 1 to 0.

int stylepal_palette = 1;
again change 1 to 0.

Q :– How do you make them open in a position where you want them, e.g. at the edge of the screen and not in the middle of the main window?

Seemingly this can be arranged too. Looking at the ColPal library file.
int colpal_centre = 1;
If you change the 1 to a 0, then the palette will open at the default position set up in the applets template file. You obviously need to use a template editor to change the default position.

Overcoming a problem with the Index applet. When it creates its own chapter at the end of the document, it takes the last chapter in the Master page as its template for the creation. If that last chapter has a footer, Index tries to cram all the indexing information into the footer and it gets lost.

Before creating the index, it is important that you have, or create, a new blank chapter at the end of the document Master page after the last chapter; remove the footer if it's copied from a previous chapter. Close the master page. Create the Index as detailed in Peter's help file. You should then find you have the end of the document proper, a blank chapter, followed by the index.

Click in the blank chapter... Then... Click Menu Page->Delete chapter. You should now be left with the document followed by the index.

navigate.gif - 3804 bytes

Index  |  Applets  |  Templates  |  Resources  |  What's new