Wsw_CheckKeywords
Sub Wsw_CheckKeywords($sMemChanges, ByRef $sStatusMessage, ByRef $iKeywordFound)
This function is called when WebSite-Watcher searches 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 and line feed characters, and duplicate blanks. The parameter $iKeywordFound is a numeric value that indicates whether keywords have been found.
If keywords are also entered in the bookmark properties (Update-On-Keywords), this function is not called if one of the entered keywords has already been found. If no keywords are entered, or none of the entered keywords are found (Update-On-Keywords), WebSite-Watcher calls this function.
Parameters
- $sMemChanges ... String expression. New or changed text of the web page, without HTML tags, CRLFs, or duplicate blanks.
- $sStatusMessage ... String expression. Status message that is displayed in the status column. The default value is an empty string.
- $iKeywordFound ... Integer value. Indicates whether keywords were found. The default value is 0.
Valid values of $iKeywordFound
- 0 ... No keywords found.
Default value. Must not be assigned manually. - 1 ... Keywords were found.
Example:
Sub Wsw_CheckKeywords($sMemChanges, ByRef $sStatusMessage, ByRef $iKeywordFound)
Dim $s = $sMemChanges
' Look for WebSite Watcher but exclude weight watcher
If KeywordExists($s, "website", True) And KeywordExists($s, "watcher", True) And Not (KeywordExists($s, "weight", True)) Then
$iKeywordFound = 1
Return
End If
If KeywordExists($s, "aignesberger", True) And KeywordExists($s, "watcher", True) Then
$iKeywordFound = 1
$sStatusMessage = "Keyword 'aignesberger + watcher' found"
Return
End If
End Sub