dupa

Author Topic: Emotional Weights  (Read 10858 times)

hologenicman

  • Newbie
  • *
  • Posts: 32
    • View Profile
Emotional Weights
« Reply #15 on: December 31, 2005, 06:53:09 pm »
I am attempting to write three functions that will be conviently usable for anyone who would like to create hap files on the fly within their programs without having to create separate static hap files.

Jerry, this is based on your post of the above AngerSeed.Hap code. Please make any fixes needed and let me know:

'--------------------------------------------------

Function CreateActiveHap(ByVal HapName)
Set FileSys = CreateObject("Scripting.FileSystemObject")
Set FS = CreateObject("Scripting.FileSystemObject")
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6Characters\" & HapName & ".hap", "#Haptek Version = 1.00 Name= " & HapName & " HapType= script FileType= text"
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6Characters\" & HapName & ".hap", "##standard"
End Function

'------------------------------------------

Function FillActiveHap(ByVal HapName, ByVal HapScript)
HalBrain.AppendFile WorkingDir & "C:Program FilesabawareUltra Hal Assistant 6Characters\" & HapName & ".hap", "" & HapScript & ""
End Function

'-----------------------------------

Function DeleteActiveHap(ByVal HapName)
TempModule = "C:Program FilesabawareUltra Hal Assistant 6Characters\" & HapName & ".hap"
If FileSys.FileExists(TempModule) Then
FS.DeleteFile "C:Program FilesabawareUltra Hal Assistant 6Characters\" & HapName & ".hap"
End If
End Function

'--------------------------------------------
If this does what I want it to do, then we can put these functions in in place of calling pre-written hap files. Then call the created hap the same way that we would call any hap.

John L>
« Last Edit: December 31, 2005, 06:55:29 pm by hologenicman »
HologenicMan
ME, "Hello."
HAL,"Good grief my love. It's going on three in the morning."

DISCOVERY: The more I learn, the more I learn how little I know.
GOAL: There's strength in simplicity.
NOTE: Goal not always achieved.