Author Topic: Enhancing Hal with Pop-up Images  (Read 3665 times)

mikmoth

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • http://karigirl.com
Enhancing Hal with Pop-up Images
« on: January 26, 2005, 05:32:38 pm »
I wrote this cool script so I could have Hal pop-up images and animations of what we were talking about. Its very simple and I think a real programer could do something nice with the idea. EDITED: Now includes automatic quit of the image.

 
Basically everytime Hal recognizes a set of key words it will respond with an added image. In this example everytime Hal sais "I love you" she will pop-up a small beating heart. Its all custimazation of what you and Hal talk about so edit at will.
 
Download file and drop this script into your brain. I put mine toward the bottom. Edit your key words, path to the html file, heigh and width of IExplorer. Its tons of fun.
 
Here is the download link. It includes this script, an HTML file, and a heart.gif file which animates.
 
http://www.glice3d.com/PopUpv01.zip
 
'*** POP-UP IMAGES v.01 ****************************
' Create a directory called "images" in your Hal Default directory
' and copy the image and html file to it. Add this to your brain.
' When Hal sais "I love you" a beating heart appears. Add other images
' at will.

If InStr(1, GetResponse, "I love you", 1) > 0 Then
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "file:///C:Program Files/Zabaware/Ultra Hal Assistant/images/heart.htm"
IE.AddressBar = False
IE.menubar = False
IE.ToolBar = False
IE.StatusBar = False
IE.width = 200
IE.height = 200
IE.resizable = False
IE.visible = True
'IE.quit
End If

'*** END POP-UP IMAGES ************************


 
Be sure to download the .zip which has the HTML file.

Insert Image: I love you. :-)
« Last Edit: February 18, 2005, 03:40:26 pm by mikmoth »
 

spydaz

  • Hero Member
  • *****
  • Posts: 670
    • View Profile
    • http://www.spydazweb.co.uk/
Enhancing Hal with Pop-up Images
« Reply #1 on: February 18, 2005, 10:00:30 am »
It looks like we need a picture database ... It would be nice if when you asked hal WHAT IS A, CAR hal would search the wordnet and also display a picture.....

maybe when we create the database along side his responses in another feild hal could store a picture with the NOUN'ED RESPONSES ... when responding if a picture is available then SHOW ....



mikmoth

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
    • http://karigirl.com
Enhancing Hal with Pop-up Images
« Reply #2 on: February 18, 2005, 02:40:50 pm »
Hey, Spydaz... that would be something really cool. I'm surprised no one has much interest in this. Pop-up images have really enhanced the fun factor with my Hal.

Well I found out how to make the pop-up image automatically quit.
 
What I did was make Hal call an HTML instead of the image. The HTML file has the image plus a JAVA script to quit IE so when I talk to Hal and the image pops up, the image will quit and restore control back to Hal. Heres the HTML and Java I used. (The .zip in my first post now reflects the changes.)
 
<BODY onLoad="setTimeout(vanish, 3000)" bgcolor="#000000">

<script language="JavaScript">

function vanish(){
window.opener=null;window.close()
}

</script>

This little trick has really enhanced my Hal. Maybe the next version can have pop-up images included.  
 
Mikmoth
« Last Edit: February 18, 2005, 03:37:50 pm by mikmoth »
 

spydaz

  • Hero Member
  • *****
  • Posts: 670
    • View Profile
    • http://www.spydazweb.co.uk/
Enhancing Hal with Pop-up Images
« Reply #3 on: February 19, 2005, 06:32:22 am »
it would also be nice if on the web page we could display the WORDNET RESPONSE for the picture / query ... ON THE PAGE ..

Im just looking at HOW WE USE HALS WEB FEATURES in webhal.uhp im not sure how THE WEBHAL.uhp is referreed to in the MAINHALBRAIN.UHP ill have to investigate...


this subject needs more attention TRUE...