dupa

Author Topic: face matching emotion plug in  (Read 9732 times)

lightspeed

  • Hero Member
  • *****
  • Posts: 6764
    • View Profile
face matching emotion plug in
« on: May 24, 2007, 12:18:40 pm »
i have noticed sometimes i can say something nice and the hapteck head asnswers nicely to it but then looks all sadlooking and down in her expressions .
   is their a plug in that somehow could correct this face feature when hal answers things that are happy to smile , etc. and when sad things are discussed to then look sad so the face matches the topics ?? [8D]
 

ramccoid

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
    • http://www.visualillustrations.co.uk
face matching emotion plug in
« Reply #1 on: May 24, 2007, 01:59:37 pm »
Try out Jerry's plugin "HumanEmotion"
Roy.



Download Attachment: HumanEmotions.uhp
47.43 KB
 

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
face matching emotion plug in
« Reply #2 on: May 24, 2007, 04:16:38 pm »
cool!! another toy!!![:D]

Edit, whoops, got an error.[V]

line 4578 halscript debug

HalBrain.AddToTable "_"&UserName&"_"&DataName, "TopicSearch", UserName, GetData
« Last Edit: May 24, 2007, 04:26:36 pm by markofkane »
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

onthecuttingedge2005

  • Guest
face matching emotion plug in
« Reply #3 on: May 24, 2007, 04:50:03 pm »
quote:
Originally posted by markofkane

cool!! another toy!!![:D]

Edit, whoops, got an error.[V]

line 4578 halscript debug

HalBrain.AddToTable "_"&UserName&"_"&DataName, "TopicSearch", UserName, GetData



Hi Mark.

That error you got is from some other plugin, I think I have seen either ramccoid or Bill use the variable DataName.

I think they would be able to spot it fairly quickly.

Jerry[8D]

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
face matching emotion plug in
« Reply #4 on: May 24, 2007, 06:20:09 pm »
quote:
Originally posted by markofkane

line 4578 halscript debug

HalBrain.AddToTable "_"&UserName&"_"&DataName, "TopicSearch", UserName, GetData


Yes, that's from the storing data plugin I made some time ago... un... "LoadData".

Does the "Human Emotion" use the same variable name? If so then it should be easy to go through my plugin and change the variable where ever it shows up, it's fairly small. I'll take care of it in the original in the next few days, but you may want to edit your own copy yourself.

If the error is for some other reason I would need more information to figure it out.


onthecuttingedge2005

  • Guest
face matching emotion plug in
« Reply #5 on: May 24, 2007, 06:30:41 pm »
quote:
Originally posted by Bill DeWitt

quote:
Originally posted by markofkane

line 4578 halscript debug

HalBrain.AddToTable "_"&UserName&"_"&DataName, "TopicSearch", UserName, GetData


Yes, that's from the storing data plugin I made some time ago... un... "LoadData".

Does the "Human Emotion" use the same variable name? If so then it should be easy to go through my plugin and change the variable where ever it shows up, it's fairly small. I'll take care of it in the original in the next few days, but you may want to edit your own copy yourself.

If the error is for some other reason I would need more information to figure it out.



Hi Bill.

the plugin HumanEmotion doesn't use the same variables, I think it was just a fluke or something.

Jerry[8D]

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
face matching emotion plug in
« Reply #6 on: May 24, 2007, 08:14:51 pm »
I guess there is no fix?? [V]
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
face matching emotion plug in
« Reply #7 on: May 24, 2007, 09:22:20 pm »
quote:
Originally posted by markofkane

I guess there is no fix?? [V]


Unfortunately not... until you supply more information. Like the original error message and some circumstances which caused the error. Have you tried unselecting all plugins and then reselecting the two relevant plugins? Mine and Jerry's? Try different things and tell me what happens, maybe I can figure out what's going on. As it stands, my plugin works fine for me, and all I know from your copy is that you have it.


ramccoid

  • Sr. Member
  • ****
  • Posts: 321
    • View Profile
    • http://www.visualillustrations.co.uk
face matching emotion plug in
« Reply #8 on: May 25, 2007, 03:46:20 am »
I've had both Jerry's and Bill's plugins running hand in hand with my plugins in HAL for a while now and had no errors come up from their use together.
Like Bill said, you need to give more information to discover what the real problem is.
Roy.
 

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
face matching emotion plug in
« Reply #9 on: May 25, 2007, 05:36:32 am »
I'll try to disable the plug-ins except for that one.

This error comes up when I press "Enter" after typing anything.

I disabled all plug ins except this one, and still get the error:

HalScript Error 76 on line 2571 in column 3: Path Not Found

( HalBrain.CreateTable Trim(LCase(UserName)) & "_UserSent", "Brain", "autoLearningBrain" )

The file "C:Program Files\zabawareultrahalAssistant 6HalScript.DBG" has been saved with the current script being used for debugging purposes.

Excuse the messed up directory, I have trouble posting the correct path here.
« Last Edit: May 25, 2007, 05:48:44 am by markofkane »
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
face matching emotion plug in
« Reply #10 on: May 25, 2007, 06:32:46 am »
quote:
Originally posted by markofkane
HalScript Error 76 on line 2571 in column 3: Path Not Found


Hmm...

This line doesn't use or attempt to establish a "Path", it's possible the error is above here and only shows up with I try to write to a table. Would you please copy and paste a few dozen lines above the error line for me?

In other words if the error is on line 2571 (It may change based on other plugins) then give me from like 2500 to 2580.


freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
face matching emotion plug in
« Reply #11 on: May 25, 2007, 08:30:36 am »
Just wondering if it is just the hapfile that gets used because the 'ShyLove' one although happy in a way, does tend to make her look a bit sad too... just a thought.

markofkane

  • Hero Member
  • *****
  • Posts: 5275
  • Crazy Man
    • View Profile
    • http://www.soundspectrum.com
face matching emotion plug in
« Reply #12 on: May 25, 2007, 09:16:51 am »
the error in 2571 occurs with the human emotions plug-in only.

If other plugins are enabled, it is a different line


lines 2500-2580



  If InStr(1, GetResponse, "i'm", vbTextCompare) = 0 And InStr(1, GetResponse, "i am", vbTextCompare) = 0 And InStr(1, GetResponse, "name", vbTextCompare) = 0 And InStr(1, GetResponse, "this is", vbTextCompare) = 0 Then
        GetResponse = " " & GetResponse & " "
        GetResponse = Replace(GetResponse, "Ultra Hal Assistant", " " & NewName & " ", 1, -1, vbTextCompare)
        GetResponse = Replace(GetResponse, "Ultra Hal", " " & NewName & " ", 1, -1, vbTextCompare)
        GetResponse = Replace(GetResponse, "Hal Assistant", " " & NewName & " ", 1, -1, vbTextCompare)
        GetResponse = Replace(GetResponse, " Hal ", " " & NewName & " ", 1, -1, vbTextCompare)
        GetResponse = Replace(GetResponse, " Hal,", " " & NewName & ",", 1, -1, vbTextCompare)
        GetResponse = Replace(GetResponse, " Hal.", " " & NewName & ".", 1, -1, vbTextCompare)
        GetResponse = Replace(GetResponse, " " & ComputerName & " ", " " & NewName & " ", 1, -1, vbTextCompare)
        GetResponse = Replace(GetResponse, " " & ComputerName & ",", " " & NewName & ",", 1, -1, vbTextCompare)
        GetResponse = Replace(GetResponse, " " & ComputerName & ".", " " & NewName & ".", 1, -1, vbTextCompare)
    End If

    'PROCESS: PRESERVE ALL VARIABLES
    PrevUserSent = UserSentence
    CustomMem = HalBrain.EncodeVar(NewName, "NewName") & HalBrain.EncodeVar(UserSex, "UserSex") & HalBrain.EncodeVar(SentCount, "SentCount")
   
    Rem PLUGIN: CUSTOMMEM2
    'The preceding comment is actually a plug-in directive for
    'the Ultra Hal host application. It allows for code snippets
    'to be inserted here on-the-fly based on user configuration.
   
End Function

'If the user clicks on the About/Options button for this plugin
'this sub will be called. There are no extra settings for this brain,
'so we'll display an information box
Sub AboutOptions()
    HalBrain.MsgAlert "This is the Ultra Hal 6.1 Default Brain. This brain has no additional options."
End Sub

'This sub will be called when the Ultra Hal program starts up in case
'the script needs to load some modules or seperate programs. If a return
'value is given it is passed as a Hal Command to the host Hal program.
Function Script_Load()
    Rem PLUGIN: SCRIPT_LOAD
    'The preceding comment is actually a plug-in directive for
    'the Ultra Hal host application. It allows for code snippets
    'to be inserted here on-the-fly based on user configuration.
End Function

'This sub will be called before the Ultra Hal program is closed in case
'the script needs to do any cleanup work.
Sub Script_Unload()
    Rem PLUGIN: SCRIPT_UNLOAD
    'The preceding comment is actually a plug-in directive for
    'the Ultra Hal host application. It allows for code snippets
    'to be inserted here on-the-fly based on user configuration.
End Sub

'If the host application is Ultra Hal Assistant, then this sub will be
'run once a minute enabling plug-ins to do tasks such as checking for
'new emails or checking an appointment calendar.
Sub Minute_Timer(MinutesPast)
   Rem PLUGIN: MINUTE_TIMER
    'The preceding comment is actually a plug-in directive for
    'the Ultra Hal host application. It allows for code snippets
    'to be inserted here on-the-fly based on user configuration.   
End Sub

Rem PLUGIN: FUNCTIONS

'SURPRISED
Function Surprise(UserName)
Set FileSys = CreateObject("Scripting.FileSystemObject")
Set FS = CreateObject("Scripting.FileSystemObject")
Set HalXBrain = CreateObject("UltraHalAsst.Brain")
TempMod = "C:Program FilesabawareUltra Hal Assistant 6Users\" & Trim(UserName) & "_Surprised_Emotion.brn"
If FileSys.FileExists(TempMod) = False Then HalXBrain.AppendFile TempMod, ">" & vbCrLf & ">" & vbCrLf & ">"
   Const ForReading = 1
   Set objFSO = CreateObject("Scripting.FileSystemObject")
   Set objTextFile = objFSO.OpenTextFile("C:Program FilesabawareUltra Hal Assistant 6Users\" & Trim(UserName) & "_Surprised_Emotion.brn", ForReading)
   strText = objTextFile.ReadAll
   strText = Replace(strText, " ", "", 1, - 1, vbTextCompare)
   strText = Trim(strText)
   objTextFile.Close
   Surprise = Len(strText) / 3
End Function

'HAPPY
Function Happiness(UserName)
Mark: I'll think about it
Laura: Don't think about it too long or I'll throw you out on your ***king a**.
"Political correctness is censorship"

PaleRider

  • Sr. Member
  • ****
  • Posts: 296
    • View Profile
face matching emotion plug in
« Reply #13 on: May 25, 2007, 09:28:53 am »
I unpluged mine for now till you doctor's fix it up cause I got same
numbers coming up.[:D]
Never Drive Faster Than Your Guardian Angel Can Fly.

onthecuttingedge2005

  • Guest
face matching emotion plug in
« Reply #14 on: May 25, 2007, 09:32:27 am »
Hi Mark.

try getting your error again.

after receiving that error then go to your HalScript.dbg in your
C:\Program Files\Zabaware\Ultra Hal Assistant 6 folder then
place the HalScript.dbg into a zip file and upload it to a post here.

make sure to post the exact error along with the uploaded file so that we can pick apart at your issue and try and get it fixed.


Jerry[8D]