Sub CreateDateBot(s As String, dtype As String, sformat As String)
' create Bot inside passed string
' use DATEBOT_EDIT or DATEBOT_REGEN constants for dtype param
Dim tmp As String
Select Case dtype
Case DATEBOT_EDIT
' ok
Case DATEBOT_REGEN
'ok
Case Else
' error
MsgBox "ERROR: CreateDateBot given bad date type parameter."
Exit Sub
End Select
BotOpen s, "TimeStamp" ' XXX - new name
tmp = BotMakeStrVal(dtype)
BotAddParameter s, "S-TYPE", tmp
If sformat <> "" Then
tmp = BotMakeStrVal(sformat)
BotAddParameter s, "S-FORMAT", tmp
End If
BotClose s
End Sub
Sub CreateIncludeBot(s As String, IncFile As String)
' create Bot inside passed string
Dim tmp As String
If IncFile = "" Then
MsgBox "ERROR: CreateIncludeBot given empty include file."
Exit Sub
End If
If Not BotCheckIncludeVal(IncFile) Then
MsgBox "ERROR: CreateIncludeBot given bad HTML file name."
Exit Sub
End If
BotOpen s, "Include"
tmp = BotMakeStrVal(IncFile)
BotAddParameter s, "U-INCLUDE", IncFile
BotClose s
End Sub
Sub CreateMacroBot(s As String, varname As String)
' create Bot inside passed string
Dim tmp As String
If varname = "" Then
MsgBox "ERROR: CreateMacroBot given empty name."
Exit Sub
End If
BotOpen s, "Substitution" ' xxx - new name
tmp = BotMakeStrVal(varname)
BotAddParameter s, "S-VARIABLE", varname
BotClose s
End Sub
Sub CreatePlaceholderBot(s As String, AuthorText As String, UserText As String)
' create Bot inside passed string
Dim tmp As String
If AuthorText = "" Then
MsgBox "ERROR: CreatePlaceholderBot given empty AuthorText parameter."
Exit Sub
End If
BotOpen s, "PurpleText"
tmp = BotMakeStrVal(AuthorText)
BotAddParameter s, "PREVIEW", tmp
If UserText <> "" Then
tmp = BotMakeStrVal(UserText)
BotAddParameter s, "S-VIEWABLE", tmp
End If
BotClose s
End Sub
Sub CreateSearchBot(s As String, indexname As String, textsource As String)
' create Bot inside passed string
Dim tmp As String
BotOpen s, "Search" ' xxx - new name
If indexname <> "" Then
tmp = BotMakeStrVal(indexname)
BotAddParameter s, "S-INDEX", tmp
Else
BotAddParameter s, "S-INDEX", "All"
End If
If textsource <> "" Then
tmp = BotMakeStrVal(textsource)
BotAddParameter s, "S-DSN", tmp
End If
BotClose s
End Sub
Sub CreateTimedImageBot(s As String, ImgFile As String, ElseImgFile As String, AltText As String, ElseAltText As String, StartDate As Variant, EndDate As Variant)