Top  Previous  Next

Sub Wsw_CheckKeywords(Handle, sMemChanges, ByRef sStatusMessage, ByRef iKeywordFound)


This function is called when WebSite-Watcher looks for keywords. It can be used for advanced keyword processing with logical operators. The parameter sMemChanges contains the new and changed text without HTML tags, carriage return linefeeds and duplicate blanks. iKeywordFound is a numeric value and indicates if keywords were found.


If keywords are also entered in the bookmark properties (Update-On-Keywords), then this function is not called if one of the entered keywords was already found. If no keywords are entered or none of the entered keywords are found (Update-On-Keywords), then WebSite-Watcher will call this function.




Handle ... Bookmark handle.
sMemChanges ... String expression. New/changed text of the web page (no HTML tags, no CRLFs, no duplicate blanks).
sStatusMessage ... String expression. Status message that will be displayed in the status column. Default value is an empty string.
iKeywordFound ... Integer value. Indicates if keywords were found. Default value is 0.


Valid values of iKeywordFound:

0 ...

No keywords found.

Default value, must not be assigned manually.

1 ...

Keywords were found.



Sub Wsw_CheckKeywords(Handle, sMemChanges, ByRef sStatusMessage, ByRef iKeywordFound)


 Dim s = LCase(sMemChanges)


   ' Look for WebSite Watcher but exclude weight watcher

   If (InStr(s, "website") > 0) And (InStr(s, "watcher") > 0) And (InStr(s, "weight") = 0) Then

      iKeywordFound = 1


   End If


   If (InStr(s, "aignesberger") > 0) And (InStr(s, "watcher") > 0) Then

      iKeywordFound = 1

      sStatusMessage = "Keyword 'aignesberger + watcher' found"


   End If


End Sub

Translate document: