User Guide

Application Object 225
AddScriptToolbutton
Syntax AddScriptToolbutton(wsToolbarName, wsScriptFile, wsHint, wsCaption,
wsImageFile: WideString): WordBool;
Description Boolean. Adds a script toolbutton (executes passed JScript or VBScript file when
clicked) to the passed toolbar. Fails if toolbar does not exist. Returns
True if a
toolbutton already exists, but does not add a duplicate button.
Example
function Main() {
Var sToolBarName = "MyToolBar";
with (Application) {
CreateToolbar (sToolBarName);
AddScriptToolbutton (sToolBarName, "C:\\temp\scripts\hello.js",
"hello.js",’A’, "");
ShowToolBar(sToolBarName);
}
}
AddTagToolbutton
Syntax AddTagToolbutton(wsToolbarName, wsTagStart, wsTagEnd, wsHint, wsCaption,
wsImageFile: WideString): WordBool;
Description Boolean. Adds a tag toolbutton (inserts tag pair when clicked) to the passed toolbar.
Fails if toolbar does not exist. Returns
True if a toolbutton already exists, but does not
add a duplicate button.
Example
function Main(){
with (Application){
AddTagToolButton(’Common’, TagCase(’<blockquote>’),
TagCase(’</blockquote>’), ’Block quote’, ’BQ’, ’’);
}
}
AddVTMToolbutton
Syntax AddVTMToolbutton(wsToolbarName, wsScriptFile, wsHint, wsCaption,
wsImageFile: WideString): WordBool;
Description Boolean. Adds a VTM toolbutton (displays passed VTM dialog box when clicked) to
the passed toolbar. Fails if the toolbar does not exist. Returns
True if a toolbutton
already exists, but does not add a duplicate button.
Example
function Main(){
var sVTM_File = ’C:\\Program Files\\Macromedia\\ColdFusion Studio
5\\Extensions\\TagDefs\\XHTML\\blockquote.vtm’;