|
Diodia ToolbarAssembler 1.1 Command Reference
Buttons in a toolbar created with Diodia
ToolbarAssembler activates commands.
The most basic command one can think of is a command opening a web page. The
Navigate command does exactly this.
Parameters are used to pass information to commands.
For example, to open Diodia Software's home page you pass the parameter
"http://www.diodia.com/" to the Navigate command.
Placeholders are used to extract the content of text
boxes in a toolbar. To pass a query string entered in a text box to the
Navigate command you use a placeholder like ##TextBox##. For example,
passing the parameter "http://www.yahoo.com/search?p=##TextBox##" to the
Navigate command opens a web page displaying the Yahoo search results
for the phrase currently entered in the text box with the id "TextBox".
Parameters and placeholders make the Navigate command
very powerful. In fact, an entire toolbar can be constructed using only the
Navigate command.
Even more powerful are the JavaScript and the
VBScript commands. These commands execute JavaScript and VBScript
code on the page currently opened in the Internet Explorer.
The script commands have access to the Internet Explorer's DOM
(Document Object Model), and can therefore analyze and make changes on the
current web page. This can be used to automatically fill out forms, find and
highlight words and add a wide range of other features to the Internet
Explorer.
Placeholders can also be used inside scripts, so it is
possible to extract the content of a text box from within a script.
The RssFeedList and RssFeedGoToArticle commands are
used to display RSS content in a toolbar. If you are building a toolbar for a
web site that supports RSS feeds then these two commands makes it very easy to
display up-to-date information from your web site in the toolbar.
The Dialog command is used to create dialogs from HTML
pages. It is mostly used to create About dialogs.
Commands:
|
Navigate |
|
The
Navigate
command is used to open web
pages. The parameter is the URL of
the web page to open.
Example:
<?xml version="1.0"
encoding="utf-8"?>
<toolband name="My
Toolbar" company="My Company">
:
<menu caption="News">
:
<button caption="CNN"
command="Navigate"
parameter="www.cnn.com"/>
<button caption="USA Today"
command="Navigate"
parameter="www.usatoday.com"/>
<separator/>
<button caption="BBC"
command="Navigate"
parameter="www.bbc.co.uk"/>
:
</menu>
:
</toolband> |
|
|
|
JavaScript |
|
The
JavaScript
command is used to execute JavaScript on the current web page.
The parameter is the name of a file containing the JavaScript code. The
file must be located in the same folder as the toolbar definition file
(ToolbarDefinition.xml).
The file containing the JavaScript code
must have the extension ".js".
The JavaScript code must define a
function called diodia_main(). This function is called when the command
is executed.
Example
(ToolbarDefinition.xml):
<?xml version="1.0"
encoding="utf-8"?>
<toolband name="My
Toolbar" company="My Company">
:
<button command="JavaScript"
parameter="autofill.js"
caption="Insert
Name"/>
:
</toolband> |
Example
(autofill.js):
function
diodia_main()
{
NameBox=document.getElementById('firstname');
NameBox.value='Nick';
} |
|
|
|
VBScript |
|
The
VBScript
command is used to execute
VBScript on the current web page.
The parameter is the name of a file containing the VBScript code. The
file must be located in the same folder as the toolbar definition file
(ToolbarDefinition.xml).
The file containing the VBScript code
must have the extension ".vb" or .vbs.
The VBScript code must define a
sub-routine called diodia_main(). This sub-routine is called when the command
is executed.
Example
(ToolbarDefinition.xml):
<?xml version="1.0"
encoding="utf-8"?>
<toolband name="My
Toolbar" company="My Company">
:
<button command="VBScript"
parameter="highlight.vb"
caption="Highlight"/>
:
</toolband> |
Example
(highlight.vb):
Sub diodia_main()
set range = document.body.createTextRange()
Do match = range.findText("##TextBox##", 0, 0)
If match <> False Then
range.pasteHTML("<span
style='background-color:yellow'>" & range.text & "</span>")
End If
range.moveEnd "word", 1000
Loop Until Not match
End Sub |
|
|
RssRssFeedList
New in version 1.1 |
|
The
RssFeedList
command displays one or more RSS
feeds in a drop-down list.
The parameter contains the addresses and the titles of the RSS feeds,
alternating and separated by ##, i.e.
|
parameter="address_1##title_1##address_2##title_2##...##address_N##title_N" |
The id attribute is used to assign a unique
identifier to the RSS feed list. The id is required to connect the RSS feed list
to a "go-to-article" button using the RssFeedGoToArticle command.
Example:
<?xml version="1.0"
encoding="utf-8"?>
<toolband name="My
Toolbar" company="My Company">
:
<combo-box command="RssFeedList"
parameter="http://rss.cnn.com/rss/cnn_topstories.rss##CNN"
id="MyFeedList"
fixed-list="yes"
width="200"
auto-size="yes"
/>
:
</toolband> |
|
|
RssFeedGoTo
Article
New in version 1.1 |
|
The
RssFeedGoToArticle
command opens an article currenly
shown by an RSS
feed list command.
The parameter contains the unique identifier of the RSS feed list to which the command
is connected.
The id attribute is used to assign a unique
identifier to the "go-to-article" button.
Example:
<?xml version="1.0"
encoding="utf-8"?>
<toolband name="My
Toolbar" company="My Company">
:
<button command="RssFeedGoToArticle"
id="MyFeedGoTo"
parameter="MyFeedList"
caption="Read..." />
:
<</toolband> |
|
|
Dialog
New in version 1.1 |
|
The
Dialog
command opens a HTML page in a
dialog window.
The parameter contains the dimensions of the dialog window and the name of the HTML
page to display,
separated by ##.
Example
(ToolbarDefinition.xml):
<?xml version="1.0"
encoding="utf-8"?>
<toolband name="My
Toolbar" company="My Company">
:
<button command="Dialog"
parameter="360##150##Dialog.htm"
caption="Dialog using HTML" />
:
</toolband> |
|
|
|