home | products | community | about aQtive | download | help
community > developers > developers pack > XML Qbits > keywords

Recipes to extend onCue

go to specific web pages on given keywords

This recipe allows you to choose a set of keywords (say "rat", "dog" and "goldfish") so that whenever you copy any of those words onCue will suggest a particular web page.

step 1 - choose your keywords

Let's say

rat, dog, goldfish

step 2 - choose the web page

Let's say the URL is http://www.surelynot.com/pet-lovers/pet-lovers.html

step 3 - choose an icon

You will need to find a GIF or JPEG image (just as used in a web site) to appear as an icon in the onCue window when your keywords are selected. The size of icon needed is 32x32 pixels. Other-sized images will be scaled to fit the space, but it is better to do this beforehand if you can. Try looking for clip-art on the web or use a web image creation program such as Macromedia Fireworks, Xara Webster or one of the shareware tools to make your own.

rat gifHere's an image you can use in this example. Right-click on the image and choose Save image as... or Save picture as... from the drop-down menu. Save the image somewhere on your hard disk, but not in the aQtive folder at this stage. Name the file rat.gif

step 4 - describe your Qbit

You need to think up a name and various descriptions of your Qbit for onCue to use for tooltips etc.

Unless you understand XML and its conventions, do not use any special characters such as <>=";& in your descriptions.

qbitname
the name you would like to call your qbit - this is used in several places, including the name at the top of the tooltip and inthe onCue Qbit preferences box . You will also need this name when you get to adding your XML Qbit to onCue later.
example: Pet Lovers Heaven
help
Some useful help text for anyone using your Qbit. This will appear as the second line of the tooltip associated with your icon in onCue and as the tooltip for your icon in the onCue Qbit preferences.
example: A page with all sorts of things about pets
label
A few words to appear in the dropdown menu from your icon in onCue.
example: pet lovers page

step 5- make the XML file

Open a keyword-template page. Select the text in your browser window and copy it into a text editor. Notepad (in the Windows Start>Programs>Accessories menu) is ideal.

Edit the file ...

  • replace **qbitname** with your Qbit's name - this is used in several places, make sure you get them all!
  • replace **keywords** with your keyword list separated by commas, and with no quotes
  • replace **icon** with the name of your icon file.
  • replace **yourname** with your own name
  • replace **help** with your help text for anyone using your Qbit.
  • replace **label** with your Qbit label.
  • replace **webpage** with the URL of the web page.

Ignore the rest of the XML!

Save the file as something like myPetQbit.xml

It should look like this keyword-example page

step 6- put your XML Qbit into onCue

Follow the instructions in adding your XML Qbit to onCue.

step 7- try it out

Restart onCue, then try copying the word "rat" or one of the words you chose.

You should see your icon appear. If you are connected to the Internet click on it to select the pet lover's page from the menu - and you are there.

congratulations!

You have made your first custom Qbit!

It will even be there as an icon in the onCue preferences box.

fine tuning - case sensitivity

By default keyword matching is not case sensitive. If, however, you do want to match keywords only in the right case you can add an extra attribute IgnoreCase="No" to the Match tag.

For example, try changing the match tag to read:

    <Match Type="Keywords" IgnoreCase="No">XML, Java, aQtive</Match>

Now the pet lovers page will only appear if the onCue user copies XML, Java or aQtive with the capitals in all in the right places. (Not very good keywords for the page, but you get the idea...)

if things go wrong ...

See my Qbit doesn't work.

Note: If you later want to edit the Qbit specification, open it by launching Notepad, or your preferred text editor, and choosing Open from the File menu, rather than by double-clicking on myPetQbit.xml. When you see the 'open' dialogue box select 'All files' in the 'Files of Type' section and then browse down to myqbits.xml.


More recipes to extend onCue


home | products | community | about aQtive | download | help