dupa

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - jenna

Pages: [1]
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]

2
Ultra Hal 7.0 / X-10 Control
« on: December 02, 2004, 08:10:47 am »
I understand that there may be a script out there somewhere to have Hal control X10 devices.  Quixote and Spydaz seems to have accomplished this.  Is it posible to share your scripts?  I've been tring to write a VB script for this X10 control, but so far haven't been able to make one work.
I have the CM11A and the Firecracker for interfaces to the PC.
Any help or direction would be a great help.
Thanks
Jenna[:)]

3
Programming using the Ultra Hal Brain Editor / TIMER QUESTION
« on: December 24, 2003, 09:28:15 am »
I have been using the Auto-Idle function now and it works great, Hal is able to talk when the user is idle two to three different times during the day.. My dilemma is that Hal doesn’t repeat the Auto-Idle function every day unless you exit Hal and restart, then the scan function will restart.  It appears that the Timer quits at or just before midnight, and doesn’t reset till you restart Hal.  Is there a way to reset the timer within a script.  I’ve tried several methods but haven’t had any luck.
Thanks
Jenna [:)]

4
Ultra Hal Assistant File Sharing Area / AUTO-IDLE MODIFIED
« on: December 16, 2003, 08:41:26 am »
'First I would like to thank all that were involved in bring the "AUTO-IDLE" to the forefront.
'Secondly I'm not sure if we can just post our scripts here without approval from someone, please advise.
'I have modified the script to have Hal only response during selective hours when users is idle.
'By change the valves  of  StartTime, EndTime and DelayTime below, you can give Hal as starting hour 'and a Ending Hour to witch he will  make comments, also changing the Delay Time will effect the seconds 'between each comment.
'I have also included a User_Idle.brn that you can download and put into your DefBrain directory.
'I'm sure there are other ways to accomplish the same thing here, but this is my first attempt to play/modify  'Hal's scripts.
'In the example below Hal will start with his comments at "9:00 am" and every 30 seconds he will pick 'something from the User_Idle.brn and will stop with his comments at 11:00 am
-----------------------------------------------------------------------------
'Script for auto response when users is idle.  
'Set desired valves below and save script
  DelayTime = 30
  StartTime = "9"
    EndTime = "11"  
 If LastResponseTime = "" Then LastResponseTime = Timer  
 TimerResponseDiff = Timer - LastResponseTime
 
If InStr(1, UserSentence, " AUTO-IDLE ", 1) > 0 And TimerResponseDiff < DelayTime Then
GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
Exit Function
End If

If InStr(1, UserSentence, " AUTO-IDLE ", 1) > 0 And TimerResponseDiff > DelayTime Then
TimerResponseDiff = 0
LastResponseTime = Timer
 AutoIdleEnable = True
 
 'This will start Hal to comment when user is idle between the times selected
 If Trim(Hour(Now)) => StarTime And Trim(Hour(Now)) < EndTime Then AutoTimeDelay = True
   If AutoIdleEnable = True And AutoTimeDelay = True Then  
      NoResponse = HalBrain.ChooseSentenceFromFile(WorkingDir & "USER_IDLE.brn")
      GetResponse = NoResponse & vbCrlf
         
  GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
  Exit Function
 End If
End If  

'This will stop Hal from commenting when user is idle between the times selected
If Trim(Hour(Now)) <= StarTime And Trim(Hour(Now)) >= EndTime Then AutoTimeDelay = False
     If AutoIdleEnable = True And AutoTimeDelay = False Then
 GetResponse = GetResponse & HalBrain.StoreVars(HalCommands, Hate, Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, CustomMem, GainControl, TopicFocus)
  Exit Function
End If
'---------------------------------------------------------------------
Function Script_Load()
    Script_Load = "<AUTO>30000</AUTO>"
End Function



Download Attachment: User_idle.brn
1.49 KB

5
Ultra Hal 7.0 / appointments
« on: October 09, 2003, 05:19:41 pm »
I'm just getting started with "HAL".  I have come across a problem.  I am triing to set a appointment for 6:00 am.  Whenever I try to set a appointment for anything before 7 AM it defaults to the "PM".  (ie: I try or 6:00 am and it will default to 6:00 pm).  Any suggestions? thanks.

Pages: [1]