dupa

Author Topic: To Rob  (Read 2332 times)

onthecuttingedge2005

  • Guest
To Rob
« on: January 08, 2006, 04:56:07 am »
Hi Rob.

I tried to get this to work both inside HAL 6 and also as a plug-in for HAL 6 but I keep getting a Path not found error.

Code: [Select]
Set Alice = CreateObject("HalAlice.PlugIn")
    GetResponse = Alice.Respond(UserSentence, UserName, WorkingDir, "data\bot.ini", "loglocaluser.txt")
    Set Alice = Nothing

I have even tried full paths and also making the path directly off the C: drive but to no avail, Path Not Found.

I have been very careful about the path.

What am I missing?
I would really love to get this going for the group.

Jerry[8D]

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
To Rob
« Reply #1 on: January 08, 2006, 09:51:28 am »
Hal6 brains have no WorkingDir variable, this is why you are getting a path not found error. I haven't tested the Alice plugin, but it should still work as a Hal 5 brain file under compatibility mode. If you wish to get Alice to work in a Hal 6 brain, you will have to figure out the path based on the DatabaseFile variable. For example, in the Hal 6 default brain the database file is "HalBrain.DB" so the DatabaseFile variable may contain something like "C:program files\zabawareultra hal assistant 6halbrain.db" In this case if you were to remove the last 11 characters from the string, you would get the working directory. This can be done like this:

WorkingDir = Left(DatabaseFile, Len(DatabaseFile) - 11)

quote:
Originally posted by onthecuttingedge2005

Hi Rob.

I tried to get this to work both inside HAL 6 and also as a plug-in for HAL 6 but I keep getting a Path not found error.

Code: [Select]
Set Alice = CreateObject("HalAlice.PlugIn")
    GetResponse = Alice.Respond(UserSentence, UserName, WorkingDir, "data\bot.ini", "loglocaluser.txt")
    Set Alice = Nothing

I have even tried full paths and also making the path directly off the C: drive but to no avail, Path Not Found.

I have been very careful about the path.

What am I missing?
I would really love to get this going for the group.

Jerry[8D]

Robert Medeksza