1
Programming using the Ultra Hal Brain Editor / AppendFile
« on: February 24, 2006, 01:19:31 pm »
Can't get the HalBrain.AppendFile to work. Here is a sample of code using the AppendFile command.
Rem PLUGIN: FUNCTIONS
'Declare Variables
Dim LastIdleResponse
Dim AutoChatStatus
Dim IdleUserName
Dim IdleComputerName
Dim WorkingDir
'*************************************************************
Rem PLUGIN: PLUGINAREA7
LastIdleResponse = Now
IdleUserName = UserName
IdleComputerName = ComputerName
Blank = ""
WorkingDir = "D:Ultra Hal Assistant 6\"
Rem PLUGIN: PLUGINAREA1
REM PLUGIN: MINUTE_TIMER
If LastIdleResponse <> "" Then
AutoChatStatus = AutoChatStatus + 1
If autochatstatus = 5 Then
IdleResponse = "Test Number 1 The Auto chat count is = " &autochatstatus & vbCrLf
IdleResponse2 = "Test Number 1 The Auto chat count is = " &autochatstatus & vbCrLf
HalMenu.HalCommand "<SPEAK>" & IdleResponse &"</SPEAK>"
HalBrain.AppendFile WorkingDir & AutoChat_Log.TXT",IdleResponse2
HalBrain.ReadOnlyMode = True
Exit Sub
End If
Code works fine except that it doesn't write to the "AutoChat_log" file. Any help would be great.
Thanks
Jenna[8D]
Rem PLUGIN: FUNCTIONS
'Declare Variables
Dim LastIdleResponse
Dim AutoChatStatus
Dim IdleUserName
Dim IdleComputerName
Dim WorkingDir
'*************************************************************
Rem PLUGIN: PLUGINAREA7
LastIdleResponse = Now
IdleUserName = UserName
IdleComputerName = ComputerName
Blank = ""
WorkingDir = "D:Ultra Hal Assistant 6\"
Rem PLUGIN: PLUGINAREA1
REM PLUGIN: MINUTE_TIMER
If LastIdleResponse <> "" Then
AutoChatStatus = AutoChatStatus + 1
If autochatstatus = 5 Then
IdleResponse = "Test Number 1 The Auto chat count is = " &autochatstatus & vbCrLf
IdleResponse2 = "Test Number 1 The Auto chat count is = " &autochatstatus & vbCrLf
HalMenu.HalCommand "<SPEAK>" & IdleResponse &"</SPEAK>"
HalBrain.AppendFile WorkingDir & AutoChat_Log.TXT",IdleResponse2
HalBrain.ReadOnlyMode = True
Exit Sub
End If
Code works fine except that it doesn't write to the "AutoChat_log" file. Any help would be great.
Thanks
Jenna[8D]