|
Built-in Functions Reference |
Top Previous Next |
|
WebSite-Watcher has many built-in functions (especially string functions) that can be called from within the Basic scripts.
In the following declarations and examples, string variables often start with "s", integer variables often start with "i" or "n". Find strings function InStr(Source As String, SearchStr As String) As Integer function LastPos(sFind, sSource) As String function FindString(sSource, sFindStr, ByRef iStartPos, ByRef iLength) As Boolean function FindWildcard(sSource, sFindWildcard, ByRef iStartPos, ByRef iLength) As Boolean function GetFirstWildcardMatch(sSource, sFindWildcard) As String function GetAllWildcardMatches(sSource, sFindWildcard) As String function DeleteAllWildcardMatches(sSource as string, sWildcard As String) as string function FindRegex(sSource, sRegex, ByRef iStartPos, ByRef iLength) As Boolean function GetFirstRegexMatch(sSource, sRegex) As String function GetAllWildcardMatches(sSource, sRegex) As String String extraction function Left(sSource As String, iLength As Integer) As String function Right(sSource As String, iLength As Integer) As String function Mid(sSource As String, iStartPos As Integer, iLength As Integer) As String sub Delete(ByRef sSource As String, iStartPos As Integer, iLength As Integer) function CopyAndDelete(ByRef sSource, iStart, iLength) As String function ExtractDigits(sSource) As String function ExtractChars(sSource, sValidChars) As String String functions for HTML processing function FindHtmlTag(sPageSource, sTagName, sParamName, ByRef iStartPos, ByRef iLength) As Boolean function DeleteHtmlTags(sPageSource) As String function OptimizeHtml(sPageSource) As String function HtmlGetParam(sTagSource, sParamName) As String function HtmlExtract(sHtmlSource, sCheckUrl As String, iOption As Integer) As String String manipulation/conversion function LCase(s As String) As String function UCase(s As String) As String function AnsiLowercase(s As String) As String function AnsiUppercase(s As String) As String function Trim(s As String) As String function LTrim(s As String) As String function RTrim(s As String) As String function Len(s As String) As Integer function Replace(sSource As String, sSearchStr As String, sReplaceStr As String) As String function ReplaceText(sSource As String, sSearchStr As String, sReplaceStr As String) As String function ReplaceWildcard(sSource As String, sSearchWildcard As String, sReplaceStr As String) As String function ReplaceRegex(sSource As String, sSearchRegexStr As String, sReplaceStr As String) As String sub Insert(sValue As String, ByRef sSource As String, iPosition As Integer) function Chr(iCharCode As Integer) As Char function Asc(s As Char) As Integer function DeleteDoubleBlanks(s As String) As String function Crc32(s As String) As String function GetUniqueID As String sub SortStringLines(ByRef s) String Lists sub StringList_AddItem(ByRef sList As String, sItem As String) sub StringList_InsertItem(ByRef sList As String, index As Integer, sItem As String) sub StringList_ChangeItem(ByRef sList As String, index As Integer, sItem As String) sub StringList_DeleteItem(ByRef sList As String, index As Integer) function StringList_GetItem(sList As String, index As Integer) As String function StringList_GetItemIndex(sList As String, sItem As String) As Integer function StringList_ItemCount(sList As String) As Integer sub StringList_Sort(ByRef sList As String) function StringList_LoadFromFile(sFilename As String, ByRef sList As String) As Boolean File related functions sub DownloadFile(Handle, sUrl As String, sReferer As String, bAllowDuplicates As Boolean) function FileExists(sFileName As String) As Boolean function FileToString(sFileName As String, ByRef s As String) As Boolean function StringToFile(sFileName As String, s As String) As Boolean function AddStringToFile(sFileName As String, s As String) As Boolean function DeleteFile(sFileName As String) As Boolean function MakeUniqueFilename(sFileName As String) As String function ExtractFileName(sFileName As String) As String function ExtractFileExt(sFileName As String) As String function ExtractFilePath(sFileName As String) As String function ChangeFileExt(sFileName As String, sDotNewFileExt As String) As String function AddBackslash(sDirectory) As String Program execution sub Execute(sProgram, sParam) function ExecuteAndWait(sProgram, sParam, bHidden) As Integer String/Number/Date conversion function CBool(expression) As Boolean function CByte(expression) As Integer function CDate(expression) As Float function CDbl(expression) As Double function CInt(expression) As Integer function CLng(expression) As Integer function CSng(expression) As Float function CStr(expression) As String Number related functions function Abs(Value As Double) As Double function Round(Value As Double) As Integer function Trunc(Value As Double) As Integer function Rnd() As Single Date/Time related functions function Now() As DateTime function Date() As DateTime function FormatDateTime(sFormat As String, dDateTime As DateTime) As String sub DecodeDate(DateValue As DateTime, ByRef Year As Integer, ByRef Month As Integer, ByRef Day As Integer) sub DecodeTime(TimeValue As DateTime, ByRef Hour As Integer, ByRef Min As Integer, ByRef Sec As Integer, ByRef MSec As Integer) function EncodeDate(Year As Integer, Month As Integer, Day As Integer) As DateTime function EncodeTime(Hour As Integer, Min As Integer, Sec As Integer, MSec As Integer) As DateTime function Day(DateValue As DateTime) As Integer function DayOfWeek(DateValue As DateTime) As Integer function IncMonth(Value As DateTime, IncValue As Integer) As DateTime function IsLeapYear(Year As Integer) As Boolean Mixed functions sub Sleep(iMilliseconds As Number) sub GetComparisonInfo(sMemWeb, sMemLocal, iComparisonMode, ByRef iQtyNew, ByRef iQtyChanged, ByRef iQtyDeleted) User interaction sub WswMessageBox(sMsg) function WswInputBox(sMsg) As String Bookmark functions function Bookmark_GetProperty(Handle, sProperty) As String sub Bookmark_SetProperty(Handle, sProperty, sValue) function Bookmark_ApplyFilter(Handle, sMem) As String sub Bookmark_AddLog(Handle, sMsg As String) function Bookmark_LoadCacheFile(Handle, iVersion As Integer) As String sub Bookmark_SaveWebDocBinary(Handle, sFilename As String) function GetWswConfiguration(sConfiguration) As String
The WebSite-Watcher Plugin System supports further functions which are currently undocumented because you will most likely never need them. You can find a list in the "Undocumented functions" reference. |