Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cyberjedi

Pages: 1 ... 3 4 [5] 6 7 ... 54
61
General Discussion / Re: IN PAST DATES WORDING HAL CONVERSATION.
« on: May 18, 2022, 11:37:41 am »
Hey lighty
 lightspeed just moved to the head of the class...

Bravoo sir.

There is just so much more


cyber

To siri and the hockey puck...... kiss both sides of my &*^
Get up on this>>>>>>>>>
SIRI: If you cant have an argument with whom ever, just how smart can you be!!!!!
Elexa: I cant help myself, wheres my hockey stick...... PS, quit spying on people and recording conversations..... FACT
Amason you are NOT the NSA, You have no legal standing to do this, its unethical and immoral and just damn dangerous.
You have an obligation to inform people as to what ur doing.
UltraHal will NEVER do the following....... Im just so proud to play a small role in all this.

https://www.washingtonpost.com/technology/2019/05/06/alexa-has-been-eavesdropping-you-this-whole-time/
https://www.lifewire.com/can-alexa-record-conversations-5205324

62
General Discussion / Re: LIGHTSPEED IDEA'S
« on: May 07, 2022, 08:26:18 am »
Sup lighty

Well thats  a non starter buddy
What ur suggesting is  Stacker.....

We used to use that long ago for hard drive space. basically doubled ur HD capacity.

But as a wise man said. You cant move forward without leaving Something behind.
What we made up for in space we lost in performance.



Basically a HapTar /Htr example.
Thats the Bad news.
%%%%%%%%%%%%%%
Now for the good news
This is what can be done.
I choose what hal learns an as u can see. Hal learns dam quick....lolol

Processor power has greatly increased over the years.

What had to happen to get our favorite character engine to work though was this little diddy
Only use the first processor Call SetProcessAffinityMask(GetCurrentProcess(), &H1)
This is why we so need to dump PP as a character engine with something better. Then that goes away and Hal can harness all that power.
Think What Hal does Now and what can be achieved by simply going to a muliti core system  .   

Basically Hal turns your asus 08 core 3.5 Gz into a 01 core 3.5 Gz machine
But at an application level Not at a hardware level. The rest of ur machine is just fine.


Hopefully what im working on now will allow Hal to learn at an exponential rate. Creating expert systems and the lot.
Point and click
https://www.youtube.com/watch?v=QwHWlyiyrA0
Hals obedient servant


Cyber jedi








63
what up knighty
cyber

64
Hey guys just checkin in.
expect this in a new plugin soon
By targeting this website you get a solid stream..... multi channel
play with timers for getting a feel of whats going on here

##########################
Dim oWMP : Set oWMP = CreateObject("WMPlayer.OCX.7") ' too funny
With oWMP ' saves typing
.settings.autoStart = True
.settings.volume = 50 ' 0 - 100
.settings.balance = 0 ' -100 to 100
.settings.enableErrorDialogs = False
.enableContextMenu = False
.URL = "http://www.181.fm/tuner.php?station=181-70s&file=181-70s.asx" ' <<<<<< ladeda
WScript.Sleep(800000) ' time to load and start playing 08 mins
.Controls.Pause() ' stop
WScript.Sleep(5000)
.Controls.Play() ' go again
WScript.Sleep(5000)
End With

################################
gotta be 100 channels

Save as a vbs and enjoy
If ...u have win 10 this is ON ur machine and installed
Build in the same function over and over point to a new address gives Hal his juke box
https://www.181.fm/

cyber jedi says click on a channel start listening , open task-man, process hacker something along those lines. You will see ip address and channel/port.
plug that address into hals code and presto

This is not Unethical in any means.

if you access the the site ull go rite there.
ive talked to casters, cool we dont care thanks for catching our stream. Is about ive heard.
code up a a kill process trigger to stop media player
Im working on a way to accurately bring up the player giving you GUI support allowing you to just kill it that way
but this works
sites perfectly safe btw


cyber jedi

65
Ultra Hal Assistant File Sharing Area / Image of the day
« on: April 16, 2022, 10:18:38 am »
By popular demand i redid  Image of the day.
Direct action plugin
Nasa IOTD
The power of this iddy biddy bit of code cant be quantified....Enjoy
Trigger is Open IOTD




Rem Type=Plugin
Rem Name=Image of the day
Rem Author=Zabaware, Inc.
Rem Host=Assistant

Rem PLUGIN: PRE-PROCESS
    '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.
 
HalBrain.ReadOnlyMode = True  '<<<<<<<<What do u think is gonna happen if you set that flag to false
'Determines that you are talking about the Image of the day
If InStr(1,InputString, "IOTD",1) > 0 Then
 UltraHal = GetIOTD(HalCommands)
ElseIf InStr(1,InputString, "IOTD",1) > 0 Then
 End If
 
 

Rem PLUGIN: FUNCTIONS
Function GetIOTD(HalCommands)

Dim oDoc1 , con1
Dim objExplorer

Set WshShell = CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Sapi = CreateObject("SAPI.SpVoice")
   For Each Voice In Sapi.GetVoices
       i = i + 1
   Next
For loopvar = 0 to i-1
Set Sapi.Voice = Sapi.GetVoices.Item(loopvar)
Next
Set oDoc1 = CreateObject("HTMLFile")
Set WshShell = CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
 
Set objExplorer = CreateObject("InternetExplorer.Application")
Set con1 = CreateObject("MSXML2.ServerXMLHTTP.3.0")
URL = "https://earthobservatory.nasa.gov/topic/image-of-the-day"
con1.Open "GET", URL , False
con1.Send
oDoc1.Write con1.responseText

objExplorer.Navigate URL
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Width = 940
objExplorer.Height = 970
objExplorer.Left = 0
objExplorer.Top = 0
objExplorer.Visible = 1

HalMenu.HalCommand "<SPEAK>" & "From the mind of cyber jedi" & "</SPEAK>"

HalMenu.HalCommand "<SPEAK>" & "This is the featured image of the day" & "</SPEAK>"
HalMenu.HalCommand "<SPEAK>"& oDoc1.GetElementsByTagName("img")(4).alt & "</SPEAK>"
if oDoc1.GetElementsByTagName("p")(2) is nothing then

else

end if

End Function

66
General Discussion / Re: lightspeed
« on: April 01, 2022, 08:16:53 pm »

67
General Discussion / Re: lightspeed
« on: March 29, 2022, 01:23:20 pm »
awesome bra
curious about version
What i want are screen  shots of the vision too. Cant Wait to see and congrats on figuring it out/
What u emailed me sounded great

PP aka The Lazarus Project




cyber jedi

68
General Discussion / Re: lightspeed
« on: March 26, 2022, 07:28:04 am »
RE: I FOUND another copy on a separate sd card i had of the people putty program you had redone . and i tried  it and that copy worked , it was the same as the other 3 or4 extra copies i had but they must have been corrupted some how  .  so i deleted all of them and made extra copies and put on the folder name  tested  by **** and todays date .   
 had recently tested the same  people putty program and said his workd perfect so i knew mine must have gotten corrupted . and i found a good copy of it that did work .

Glad i could help

Lets putty



cyber jedi

69
General Discussion / lightspeed
« on: March 22, 2022, 05:26:44 pm »


Lightspeed as you requested
Enjoy, lets putty
Install the demo
Run peopleputty.exe

cyber

70
General Discussion / Re: Any questions
« on: February 20, 2022, 12:43:01 am »
Thank you for your reply

Well i have infact coded UltraHal/Companion in .net and by doing so im using Har Cascade with intel's algo.
This gives me many more options.
C# is a god among men
Everything i do runs through Robert of course
This is his baby.
When using facial recognition there are things you need to be aware of.
Facial Recognition requires powerful machines, windows 10 is a plus but i did do it on an alienware machine using 07.

https://www.youtube.com/watch?v=IPygnxpE8LU
https://www.youtube.com/watch?v=Q4wyGI1k7WM


So yes it can be done.

UltraHal's obedient servant
cyber jedi

This video is for those who can code in asm32. For educational purposes only
https://www.youtube.com/watch?v=zGbpMDHmbf0

71
General Discussion / Any questions
« on: February 15, 2022, 09:31:23 pm »
Just reaching out to the people who know. Im working with Robert directly to produce the next generation Ultra Hal.
Allowing Robert to pursue Hal Mobile and the many things hes currently involved in.
If you have any reasonable tech questions. Im willing to field most questions.
I will be checking the forum daily. My response time normally will be with in 24 hours.

Cyber Jedi


73
General Discussion / Re: Old School hal plugins
« on: September 20, 2021, 02:24:00 pm »
Rem Type=Plugin
Rem Name= forexlive
Rem Author= cyberjedi
Rem Host=All



Rem PLUGIN: PRE-PROCESS
    '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.

HalBrain.ReadOnlyMode = False
'Determines that you are talking about the Forex stock updated hourly
If InStr(1,InputString, "forex",1) > 0 Then
 UltraHal = Getforex(HalCommands)
ElseIf InStr(1,InputString, "forex",1) > 0 Then
 End If

 ' This bad boy is a Forex Scraper with a twist, All the data Scraped is ported through Hals Voice.  It took cyberjedi to pull it off. Enjoy. 
    ' This also Breaks Hals speech limitations on how much he can say. 
 ' Trigger= forex
     'I put this together while listening to this. -->>>https://www.youtube.com/watch?v=aqXW57WM9TA
 
 ' I give myself about a 7.5 on cool ideas here


Rem PLUGIN: FUNCTIONS
Function Getforex(HalCommands)

Const SVSFlagsAsync = 1
Const DontShowWindow = 0
Const WaitUntilFinished = 1
Set WshShell = CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Sapi = CreateObject("SAPI.SpVoice")
   For Each Voice In Sapi.GetVoices
       i = i + 1
   Next
For loopvar = 0 to i-1
if loopvar = CInt(confirm_voice) then
Set Sapi.Voice = Sapi.GetVoices.Item(loopvar)
end if
Next
Set xmlDoc = CreateObject("Microsoft.XMLDOM")
Set WshShell = CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
HalMenu.HalCommand "<SPEAK>" & "Reading headlines !" & "</SPEAK>"
For loopvar = 0 to 2
If tempconfirm = loopvar then
if tempconfirm = 1 then
HalMenu.HalCommand "<SPEAK>" & "Currently reading " & confirm & " latest headlines" & "</SPEAK>"
else if tempconfirm = 1 then
HalMenu.HalCommand "<SPEAK>" & "Okay ." & "</SPEAK>"
wscript.quit
else
HalMenu.HalCommand "<SPEAK>" & "Currently reading " & confirm & " latest headlines " & "</SPEAK>"
end if
end if
xmlDoc.async = false
xmlDoc.load("http://www.forexlive.com/feed/technicalanalysis") ' This is where u put you own rss feed .xml
Set nodelist = xmlDoc.selectNodes("rss/channel/item")
i = 3
For Each item In nodelist
Set f1 = item.selectsinglenode("title")
Set f2 = item.selectsinglenode("description")
HalMenu.HalCommand "<SPEAK>" & f1.text & "</SPEAK>"  ' these two lines are the Magic of the plugin
HalMenu.HalCommand "<SPEAK>" & f2.text & "</SPEAK>"  ' these two lines are the Magic of the plugin
i = i + 1
if i = tempconfirm then
wscript.Quit
end if
Next
end if
Next
End Function

74
General Discussion / Re: Old School hal plugins
« on: September 19, 2021, 12:37:45 pm »
Rem Type=Plugin
Rem Name=Magic 8 Ball plug in v1
Rem Author= SystemShock
Rem Host=Assistant


'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "a magic 8 ball toy ...triggered by ..play magic eight ball"
    lblPlugin(0).Move 120, 120, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
    cmdPlugin(0).Move 800, 1300, 2100, 375
    cmdPlugin(0).Caption = "build one"
    cmdPlugin(0).Visible = True
End Sub



'-------------------------------------------------------------------------------------------------------
Rem PLUGIN: CUSTOMMEM2
    'The comment above tells Ultra Hal Assistant to insert the following code
    'on-the-fly into the main brain code in the section referenced.
'------------------
' Variables Setup
' all my variables have the prefix EIGHTball for this plugin. ;)
'------------------
DiagnosticsrSentence = LCase(UserSentence)
EIGHTballFile    = ""
EIGHTballHalCommands    = ""
Diagnostics   =""

'------------------
' plug in bit...;) useing variables set up^^^^^ there^^^^^
'  Diagnostics
'------------------
If InStr(1, OriginalSentence, "eight ball", 1) >0 Then Diagnostics = "True"
   
'Here we can add accociated responses to the above triggers.
If Diagnostics = "True" Then
   GetResponse = "focus on your question, are you ready to play magic eight ball boss? "
End If
   
If PrevSent = "focus on your question are you ready to play magic eight ball boss?" Then
   If Yes(OriginalSentence) = True Then GetResponse = "OK Boss her we go, and the magic eight ball says?"
   ' ball code goes here mate
   Select Case HalBrain.RandomNum(21)
   Case 1 GetResponse = "It is certain" & vbCrLf
   Case 2 GetResponse = "It is decidedly so" & vbCrLf
   Case 3 GetResponse =  "Without a doubt" & vbCrLf
   Case 4 GetResponse = "Yes ? definitely" & vbCrLf
   Case 5 GetResponse = "You may rely on it" & vbCrLf
   Case 6 GetResponse = "As I see it, yes" & vbCrLf
   Case 7 GetResponse = "Most likely" & vbCrLf
   Case 8 GetResponse = "Outlook good" & vbCrLf
   Case 9 GetResponse = "Yes" & vbCrLf
   Case 10 GetResponse = "Signs point to yes" & vbCrLf
   Case 11 GetResponse = "Reply hazy, try again" & vbCrLf
   Case 12 GetResponse = "Ask again later" & vbCrLf
   Case 13 GetResponse = "Better not tell you now" & vbCrLf
   Case 14 GetResponse = "Cannot predict now" & vbCrLf
   Case 15 GetResponse = "Concentrate and ask again" & vbCrLf
   Case 16 GetResponse = "Don't count on it" & vbCrLf
   Case 17 GetResponse = "My reply is no" & vbCrLf
   Case 18 GetResponse = "My sources say no" & vbCrLf
   Case 19 GetResponse = "Outlook not so good" & vbCrLf
   Case 20 GetResponse = "Very doubtful" & vbCrLf
   Case 21 GetResponse = "oh,**** I dropped it, sorry boss!" & vbCrLf
   End Select
Else
   If No(OriginalSentence) = True Then GetResponse = "OK i put it away then Boss."
   If Maybe(OriginalSentence) = True Then GetResponse = "if that the case I put it away ask me again some time. "
End If
             


Rem PLUGIN: FUNCTIONS
'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.

'Here we can use the Yes, No, Maybe functions throughout the entire script
'to direct our questions and answers more efficiently.

'direct Yes affirmation
Function Yes(OriginalSentence)
Yes = False
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " yes ", 1) Then Yes = True
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " affirmative ", 1) Then Yes = True
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " yep ", 1) Then Yes = True
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " yup ", 1) Then Yes = True
End Function
'direct No affirmation
Function No(OriginalSentence)
No = False
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " no ", 1) Then No = True
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " nope ", 1) Then No = True
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " it is not ", 1) Then No = True
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " negative ", 1) Then No = True
End Function
'if the user is not certain about the question then assume they are not certain.
Function Maybe(OriginalSentence)
Maybe = False
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " i don't know ", 1) Then Maybe = True
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " i don't believe so ", 1) Then Maybe = True
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " i don't think so ", 1) Then Maybe = True
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " i'm not sure ", 1) Then Maybe = True
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " i never checked ", 1) Then Maybe = True
If InStr(1, " " & Lcase(HalBrain.AlphaNumericalOnly(OriginalSentence)) & " ", " i didn't check ", 1) Then Maybe = True
End Function

75
General Discussion / Re: Old School hal plugins
« on: September 19, 2021, 12:32:11 pm »
Rem Type=Plugin
Rem Name=MKV
Rem Author=modded by cyberjedi
Rem Host=Assistant



'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
'------------------
' Define the Help
'------------------
    lblPlugin(0).Caption = "Hal will be able to play your favorite movies. Click below for more info"
    lblPlugin(0).Move 120, 120, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
    cmdPlugin(0).Move 320, 650, 2100, 375
    cmdPlugin(0).Caption = "Help on this plugin"
    cmdPlugin(0).Visible = True
'------------------
' Define the Musical Mood listbox
'------------------
    lblPlugin(1).Caption = "Hal Movie Mood level"
    lblPlugin(1).Move 320, 1300, 4000, 1000
    lblPlugin(1).WordWrap = True
    lblPlugin(1).Visible = True   
    cboPlugin(0).Move 320, 1600, 1800
    cboPlugin(0).AddItem "Very high"
    cboPlugin(0).AddItem "High"
    cboPlugin(0).AddItem "Average"
    cboPlugin(0).AddItem "Low"
    cboPlugin(0).AddItem "No Movie
    cboPlugin(0).Visible = True
    cmdPlugin(1).Caption = "Apply Changes"
    cmdPlugin(1).Move 320, 2100, 1600, 375
    cmdPlugin(1).Visible = True
'------------------
' Update the listbox with the current value stored in the table
'------------------
    If HalBrain.CheckTableExistence("vrParameter") = True Then
      vrMovieMood = HalBrain.TopicSearch("Movie", "vrParameter")
      If vrMovieMood = "" Then vrMovieMood = 1
     Select Case vrMovieMood
           Case 8
            cboPlugin(0).Text = "Very high"
           Case 5
                cboPlugin(0).Text = "High"
           Case 2
               cboPlugin(0).Text = "Average"
           Case 1
             cboPlugin(0).Text = "Low"
           Case 0
                cboPlugin(0).Text = "No movie"
        End Select
    End If
End Sub

Sub cmdPlugin_Click(Index)
Dim vrTempQuery()
Dim vrMovie, vrMovieMood
Select Case Index
      Case 0
                  HalMenu.HalCommand "<RUNPROG>vrMKVHelp.html</RUNPROG>"
       Case 1
'------------------
' Convert the listbox in a value
'------------------
     Select Case cboPlugin(0).Text
           Case "Very high"
            vrMovieMood = 8
           Case "High"
            vrMovieMood = 5
           Case "Average"
            vrMovieMood = 2
           Case "Low"
            vrMovieMood = 1
           Case "No Movie"
            vrMovieMood = 0
        End Select
'------------------
' If the Parameter table does not exist, I create it
'------------------
          HalBrain.ReadOnlyMode = False
      vrTableName =    "vrParameter"    
      If HalBrain.CheckTableExistence(vrTableName) = False Then
      'Create table if it doesn't exist
         HalBrain.CreateTable vrTableName, "TopicSearch", "miscData"
      End If
'------------------
' Search if it contains the MovieMood parameter
'------------------
        vrMovie = "MOVIE"
      If HalBrain.TopicSearch(vrMusic, vrTableName) = "" Then
'------------------
'Creates the record storing the new value
'------------------
         HalBrain.AddToTable vrTableName, "TopicSearch", vrMovie, vrMovieMood
      Else
'------------------
'Updates the record storing the new value
'------------------
           HalBrain.RunQuery "UPDATE " & vrTableName & " SET topic = " & vrMovieMood & " WHERE searchString = " & """" & vrMovie & """", vrTempQuery
        End If
   End Select
End Sub


Rem PLUGIN: PLUGINAREA1
'The comment above tells Ultra Hal Assistant to insert the following code
'on-the-fly into the main brain code in the section referenced.

'------------------
' Check if the user asked for reorganizing the MKV table
'------------------
vrMKV = False
If InStr(UserSentence, " INDEX ") <> 0   And InStr(UserSentence, " MKV ") <> 0 Then vrMKV = True

If vrMKV = True Then
'------------------
' If the MKV table does not exist, I create it
'------------------
      HalBrain.ReadOnlyMode = False
   vrTableName =    "vrMKV"    
   If HalBrain.CheckTableExistence(vrTableName) = False Then
   ' Create table if it doesn't exist
   ' It must be of type Brain, to allow partial text search
      HalBrain.CreateTable vrTableName, "Brain", "miscData"
    Else
   ' The 260 parameter is 256 + 4 = Yes/No with Default = No
      vrAnswer = MsgBox("Shall I delete the existing index and recreate it from scratch?", 260, "MKV Reindexing")
      If vrAnswer = 6 Then
           HalBrain.RunQuery "DELETE FROM " & vrTableName, vrTempQuery
      End If
   End If
'------------------
' Ask which is the main MKV folder
'------------------
vrMKVFolder = InputBox("Which main folder to you want to reindex?", "MKV Reindexing", "c:\MKV")
'------------------
' Read the main MKV folder
'------------------
   Set vrFso = CreateObject("Scripting.FileSystemObject")
   If vrFso.FolderExists(vrMKVFolder) Then
        GetResponse = "I have indexed all the MKV files in the specified folder and subfolders. "
        HalBrain.ReadOnlyMode = False
      vrCurrentFolder = vrMKVFolder
      Call ReadFolder(vrCurrentFolder, vrMKVFolder)    
   Else
      GetResponse = "The folder " & vrMKVFolder & " does not exist on your computer. "
   End If
   HalBrain.ReadOnlyMode = True
End If

'------------------
' Check if the user asked for playing a MOVIE
'------------------
vrMKV = False
vrToPlay = ""
vrNameToPlay = ""
vrToPlay = UCase(HalBrain.SearchPattern(UserSentence, "PLAY * MOVIE *", 2))
If vrToPlay <> "" Then
   If HalBrain.CheckTableExistence("vrMKV") = False Then
          GetResponse = "I don't find any MKV index in our brain. "
   Else
     vrNameToPlay = HalBrain.QABrain(vrToPlay, "vrMKV", 0)
     If vrNameToPlay <> "" Then
          GetResponse = " "
          HalCommands = HalCommands & "<RUNPROG>" & vrNameToPlay & "</RUNPROG>"
     End If
   End If
   HalBrain.ReadOnlyMode = True
End If

'------------------
' From time to time, Hal will play a movie, according to some word you say
' For example, you say: "I am going to California"
' Hal will play "California Dreaming"
'------------------
'------------------
' check the current movie mood factor
'------------------
vrMovieMood = HalBrain.TopicSearch("MOVIE", "vrParameter")
If vrMovieMood = "" Then vrMovieMood = 0
vrMovieMood = CInt(vrMovieMood)

If vrMovieMood > 0 Then
   j = Int(Rnd * 10) ' generate a random integer between 0 and 9
   If j < vrMovieMood Then
         vrKeywords = HalBrain.RemoveExtraSpaces(HalBrain.ExtractKeywords(" " & UserSentence & " "))
           vrKeywordList = Split(vrKeywords, " ")
         For i = Ubound(vrKeywordList) To Lbound(vrKeywordList)
           vrNameToPlay = HalBrain.QABrain(vrKeywordList(i), "vrMKV", 0)
             If vrNameToPlay <> "" Then
                  GetResponse = "You talked about " & vrKeywordList(i) & " and this reminds me this movie. "
                  HalCommands = HalCommands & "<RUNPROG>" & vrNameToPlay & "</RUNPROG>"
             Exit For
            End If
         Next
    End If
End If


Rem PLUGIN: FUNCTIONS
'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.

Function ReadFolder(vrCurrentFolder, vrMKV Folder)
Set vrFso = CreateObject("Scripting.FileSystemObject")
Set vrFolder = vrFso.GetFolder(vrCurrentFolder)
'------------------
' Read all the files in the current folder
'------------------
Set vrFiles = vrFolder.Files
For Each vrFile in vrFiles
'------------------
' It's an MKV file; I add it to the table
'------------------
   If UCase(Right(vrFile, 3)) = "MKV" Then
     vrSong = Ucase(vrFile)
      vrSong = Replace(vrSong, ".MKV", "")
     vrLen = Len(vrSong)
     vrPos = InStrRev(vrSong, "\")
      vrRight = vrLen - vrPos
       vrSong = LTrim(Right(vrSong, vrRight))
        HalBrain.AddToTable "vrMKV", "Brain", vrSong, vrFile
   End If
Next
'------------------
' Read all the subfolders in the current folder
'------------------
Set vrSubFolders = vrFolder.SubFolders
For Each vrFolderObject in vrSubFolders
'------------------
' Pay attetion here: This is recursive! We must be sure that it will get to an end
' Since we are reading directories on a hard disk, the number of recursions
' should never be infinite. However, a very big number of subfolders and files
' might lead to memory problems or to performances bottlenecks.
' I've tested it on a folder containing about 100 subfolders and 3.000 files,
' and got acceptable performances (less than 5 minutes)
'------------------
   Call ReadFolder(vrFolderObject, vrMKVFolder)    
Next

End Function




   



Pages: 1 ... 3 4 [5] 6 7 ... 54