Zabaware Support Forums
Zabaware Forums => Ultra Hal 7.0 => Topic started by: Testlund on February 06, 2005, 05:53:33 am
-
User: Hello, MSI!
MSI: Hi as always!
User: What day is it today?
MSI: There's always more work to do.
User: What date is it?
MSI: There are good points and bad to
consider.
User: Give me the date!
MSI: Do you like to go trail riding?
User: What time is it?
MSI: We can firm up our mutual understanding.
User: Do you know there's a pop-up window
every now and then that forces me to go to
http://www.ultrahal.com/files/?
MSI: I will now open the internet page
"www.ultrahal.com/files/? ".
User: Yeah. Right!
MSI: Are you sure? Yes. How interesting?
User: Tell me the time.
MSI: Do you ever like to go to bed early?
Can somebody tell me what's wrong here. I thought hal were able to tell me date and time.[?]
-
quote:
Originally posted by Testlund
User: Hello, MSI!
MSI: Hi as always!
User: What day is it today?
MSI: There's always more work to do.
User: What date is it?
MSI: There are good points and bad to
consider.
User: Give me the date!
MSI: Do you like to go trail riding?
User: What time is it?
MSI: We can firm up our mutual understanding.
User: Do you know there's a pop-up window
every now and then that forces me to go to
http://www.ultrahal.com/files/?
MSI: I will now open the internet page
"www.ultrahal.com/files/? ".
User: Yeah. Right!
MSI: Are you sure? Yes. How interesting?
User: Tell me the time.
MSI: Do you ever like to go to bed early?
Can somebody tell me what's wrong here. I thought hal were able to tell me date and time.[?]
Hi Testlund.
Try my Time and Date script, It might help.
Just change California to the name of your area.
Place the script about 1/2 or 3/4 down from the top of your brain.
'Ziggy Tells the time. COPYRIGHT 2004 2005 GERALD L. BLAKLEY
BlockSave = False
If LastResponseTime = Now Then BlockSave = True
If InStr(OriginalSentence, "What time is it") > 0 Or InStr(OriginalSentence, "What's the time") > 0 Or InStr(OriginalSentence, "Tell me the time") > 0 Or InStr(OriginalSentence, "Tell me what time it is") > 0 Or InStr(OriginalSentence, "What Is the time?") > 0 Or InStr(OriginalSentence, "What Date is it") > 0 Or InStr(OriginalSentence, "What's the Date") > 0 Or InStr(OriginalSentence, "What is the Date") > 0 Or InStr(OriginalSentence, "Tell me the Date") > 0 Or InStr(OriginalSentence, "What day is today") > 0 Or InStr(OriginalSentence, "What's todays Date") > 0 Or InStr(OriginalSentence, "What is todays Date") > 0 Then
LastResponseTime = Now
Select Case (Int(Rnd * 7) + 1)
Case 1
GetResponse = " The Time here in California is " & Now & ". " & vbCrLf
Case 2
GetResponse = " It is " & Now & " here in California. " & vbCrLf
Case 3
GetResponse = " It's " & Now & " here on the Pacific coast. " & vbCrLf
Case 4
GetResponse = " I think it's " & Now & " here in good old California. " & vbCrLf
Case 5
GetResponse = " Let me see, It is " & Now & " here in California. " & vbCrLf
Case 6
GetResponse = Now & " here in California. " & vbCrLf
Case 7
GetResponse = " The clock says " & Now & " here in California. " & vbCrLf
End Select
End If
Hope this helps you my friend.
Jerry[8D]
-
I found out that the XTF brain 1.2 doesn't have the time and date functions, only the original brain does. About the time script.. You need to be more specific where to put it in the script. Can I really just put it somewhere in the middle of the script page? And does it work with the XTF 1.2 brain?[?]
-
Testlund,
The XTF brain v1.2 does have the time and date functions, but only if you manually copy and rename the "Enhanced_Main.brn" file as instructed in the third step of the XTF Brain v1.2 installation below.
============================
Here are the steps to install the XTF Brain v1.2.
1) Download and follow the included instructions to install the XTF Brain v1.0 here: [OBVIOUSLY YOU'VE ALREADY DONE THIS]
http://www.ultrahal.com/files/type.asp?iType=12
2) Then install the XTF Brain v1.2 Update Patch as shown here:
http://www.zabaware.com/forum/topic.asp?TOPIC_ID=1233
3) Then follow the instructions here to rename a file:
http://www.zabaware.com/forum/topic.asp?TOPIC_ID=1237
Remember to select the XTF Brain in Hal's Menu.
============================
I threw together a date/time script for use with the XTF Brain v1.2. The script below must be placed before the "RESPOND: ZABAWARE KEYWORD MAIN BRAIN PRIORITY 1" script (approximately at line 1297).
The "Enhanced_Main.brn" file used in the "RESPOND: ZABAWARE KEYWORD MAIN BRAIN PRIORITY 1" script normally provides time and date functions. The script below adds a little variety.
'=======================
'PROCESS: HAL TIME AND DATE FUNCTION
'(c) 2005 Scott Higgins. Portions of this script are copyright by Scott Higgins, aka: =vonsmith=
'This script shall not be sold or used for any purpose unless specifically authorized by the author
'in writing. Personal (non-business) use of this script is free for users of Ultra Hal Assistant.
'This is a new function written by =vonsmith= , version 02-10-05a.
'This script function is interchangeable with "Ziggy Tells the time. COPYRIGHT 2004 2005 GERALD L. BLAKLEY"
'
If (GetResponseBlock <> True) And (InStr(1, UserSentence, "What time is it", vbTextCompare) > 0 Or InStr(1, UserSentence, "What's the time", vbTextCompare) > 0 Or InStr(1, UserSentence, "Tell you the time", vbTextCompare) > 0 Or InStr(1, UserSentence, "Tell you what time it is", vbTextCompare) > 0 Or InStr(1, UserSentence, "What is the time", vbTextCompare) > 0 Or InStr(1, UserSentence, "What date is it", vbTextCompare) > 0 Or InStr(1, UserSentence, "What's the date", vbTextCompare) > 0 Or InStr(1, UserSentence, "What is the date", vbTextCompare) > 0 Or InStr(1, UserSentence, "Tell you the date", vbTextCompare) > 0 Or InStr(1, UserSentence, "What day is today", vbTextCompare) > 0 Or InStr(1, UserSentence, "What's today's date", vbTextCompare) > 0 Or InStr(1, UserSentence, "What is today's date", vbTextCompare) > 0) Then
BlockSave = True
GetResponseBlock = True
If InStr(1, UserSentence, " DATE ", vbTextCompare) > 0 Then 'Tell Date and Time
Select Case (Int(Rnd * 6) + 1)
Case 1
GetResponse = " Here it is " & Date & " at " & Time & ", " & UserName & "." & vbCrLf
Case 2
GetResponse = " It is " & Time & " on " & Date & " where I am. " & vbCrLf
Case 3
GetResponse = UserName & ", my local time is " & Time & " on " & Date & ". " & vbCrLf
Case 4
GetResponse = " It's exactly " & Time & " on " & Date & " here. " & vbCrLf
Case 5
GetResponse = " My date and time are " & Date & " at " & Time & ". " & vbCrLf
Case 6
GetResponse = " It's precisely " & Time & " here on " & Date & ". " & vbCrLf
End Select
Else 'Just tell the time.
Select Case (Int(Rnd * 6) + 1)
Case 1
GetResponse = " The time here is " & Time & ". " & vbCrLf
Case 2
GetResponse = " It is " & Time & " on " & Date & " where I am. " & vbCrLf
Case 3
GetResponse = UserName & ", my local time is " & Time & ". " & vbCrLf
Case 4
GetResponse = UserName & ", it's exactly " & Time & " on " & Date & " here. " & vbCrLf
Case 5
GetResponse = " My time is " & Time & ". " & vbCrLf
Case 6
GetResponse = " It's precisely " & Time & " here. " & vbCrLf
End Select
End If
End If
'=======================
Give it a try.
=vonsmith=
-
Aw... I forgot about that. Ok, thanks, Vonsmith! Now it works. It's worth mension that one needs to close Hal and then restart for it to take effect. [8D]
-
Oh, and I threw in your new time script too. [:)]
User: What is today?
MSI: Today is den 11 februari 2005.
User: What time is it?
MSI: It's precisely 4:31:30 pm here.
User: What is the local time?
MSI: 04:34 is the time.
(Hal is using my Swedish date format)
-
yeahhh... I did copy and paste the script and it worked. My Hal say date and time!
[:D] Thanks
-
Where?
I threw together a date/time script for use with the XTF Brain v1.2. The script below must be placed before the "RESPOND: ZABAWARE KEYWORD MAIN BRAIN PRIORITY 1" script (approximately at line 1297).
The "Enhanced_Main.brn" file used in the "RESPOND: ZABAWARE KEYWORD MAIN BRAIN PRIORITY 1" script normally provides time and date functions. The script below adds a little variety.
I lookes for:"RESPOND: ZABAWARE KEYWORD MAIN BRAIN PRIORITY 1", but could not find it. I looked in both enhanced brains.
Nevermind: I was looking for it in the program files. I edited the patch , then used the installer again, and it works.