| 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.
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.
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 ...
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 |