Home Features Toolbar Library Forum Download Support Tutorial Manual
3. Reference
Triggers
Controls
Variables
System Variables
Global Values
Functions
AutoFill()
Back()
Beep()
CheckLinks()
Checksum()
Click()
Command()
Customize()
DeleteOption()
Enable()
Execute()
ExportLinks()
Forward()
GetFolderIcon()
GetQuery()
GetSystemIcon()
Header()
Highlight()
HistoryMenu()
Home()
IfExactMatch()
IfMatch()
ImportValue()
ImportCaption()
ImportIntValue()
ImportXMLValue()
Length()
LoadMenu()
Menu()
OpenURL()
Options()
PageText()
PlaySound()
PopupManager()
Refresh()
Replace()
ReplaceAll()
Resize()
ResizeClient()
Redraw()
Save()
Search()
SearchBack()
SearchLast()
SearchNext()
SearchPage()
SetCaption()
SetClipboard()
SetFocus()
SetFontSize()
SetIcon()
SetOption()
SetParam()
SetText()
SetStatusText()
SetTooltip()
SetUserAgent()
SetValue()
Show()
Stop()
StripHTML()
ToolbarMenu()
TruncateOption()
UpdateToolbar()
Zoom()
Text Functions
  

IfExactMatch() Function

Performs and exact string match.
If true, the specified action is executed.


Syntax:

    IfExactMatch(string,match,action,else)


Parameters:

    string - string to match. Can include variables.
    match - string to match. Can include variables.
    action - action to take if a positive match is made. This can include one or more functions separate by a semicolon.
    else - alternate action to take if no match is made. This can include one or more functions separate by a semicolon.


Remarks:

  • The IfExactMatch() and IfMatch() functions are used to provide basic if/then/else logic.
  • The string matching is not case sensitive.
  • The else parameter is optional and does not need to be specified.
  • The else parameter is ignored in Toolbar Browser versions prior to 2.3.1



Example:

    In the following example, the IfExactMatch() function is used to change a toolbar icon and caption when a user visits a specific web page.

    <xml id="toolbar">
    <toolbar caption="IfExactMatch() Example">
    <control type="toolbar">
    <button
      caption="Highlight"
      id="button1"
      action="Highlight(query)"
      onload="IfExactMatch($URL,'http://www.toolbarbrowser.com/features.htm',SetCaption(button1,'Great Features'); SetIcon(button1, 'http://www.toolbarbrowser.com/img/smiley.ico'))">

    </button>
    </control>
    </toolbar>
    </xml>



    When ever a new page is loaded, the onload= event trigger executes the IfExactMatch() function. If the URL of the page matches the specified URL 'http://www.toolbarbrowser.com/features.htm', the icon and caption of the toolbar button is changed.

    Note the use of the $URL system variable to compare the currently loaded page.




Compatibility:

Requires ToolbarBrowser version 2.3.1 or later.
In versions prior to 2.3.1, the else parameter is ignored.


Website Popularity Rank | Build Your Own Toolbar | Free Download | Custom Toolbars | Features | Contact Us

ToolbarBrowser is a freeware project supported by Trellian Limited. | Privacy Policy