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 - knight2000

Pages: 1 2 [3] 4 5 ... 11
31
Ultra Hal 7.0 / Re: speak to hal over http
« on: June 27, 2019, 10:11:26 am »
Thanks for the info cyberjedi! I've been programming for 15 years, i try to avoid VB6 like the plague but i know my way around it. So writing the code will not be a problem. I was hoping there was already an api i could tie into but i guess not. I'd love to make a python wrapper for this, it may still be possible but i'm gonna have to write the api first it sounds like. I wont ask you for your code because i know you put a lot of time and effort into it, but if you could point me in the right direction. Is there any documentation about how to get started?

32
Ultra Hal 7.0 / Re: speak to hal over http
« on: June 26, 2019, 12:33:54 pm »
How would i go about doing this? Is there an api to call? Can you point me in the right direction?

33
Ultra Hal 7.0 / speak to hal over http
« on: June 26, 2019, 11:32:08 am »
Hi guys, i was wondering if we could access Hal over the web. Meaning, i have a server that has Hal installed, i'd like to create a simple mobile website that i could use to chat with my Hal. Is that possible?

34
Ultra Hal 7.0 / Re: Hal on Linux?
« on: April 22, 2019, 12:06:49 am »
 :o

35
Ultra Hal 7.0 / Hal on Linux?
« on: April 20, 2019, 06:45:41 pm »
Hi guys! Will Hal run on Linux?

36
I would like to control Hal's mic after Hal has started up using the command line. The following code works fine if Hal is not running

"C:\Program Files (x86)\Zabaware\Ultra Hal 7\UltraHal7.exe" <SHOWHAL><MICON>"

Hal i will start with his mic enabled

However if Hal is already running he ignores any command line arguments.

Is there a way around this?

37
Ultra Hal 7.0 / Re: Tell Hal to stop listening?
« on: March 27, 2019, 10:08:12 am »
Thats a cool utility, but my problem is that once Hal is running, the command line args do not work. If i exit hal then run my python program, Hal starts up with the mic enabled. Sorry, i probably should have said that before. So even if i pull up a command prompt and execute C:\Program Files (x86)\Zabaware\Ultra Hal 7\UltraHal7.exe <SHOWHAL><MICON> while Hal is already running, his mic doesn't come on. I have to exit Hal completely in order for that command to work.


38
Ultra Hal 7.0 / Re: Tell Hal to stop listening?
« on: March 26, 2019, 10:22:15 am »
Im using the vrMP3 plugin but i altered the code to grab the length of the song. See below

Code: [Select]
If vrToPlay <> "" Then
   If HalBrain.CheckTableExistence("vrMp3") = False Then
        GetResponse = "I dont have that song on file. "
   Else
     vrNameToPlay = HalBrain.QABrain(vrToPlay, "vrMp3", 0)
     If vrNameToPlay <> "" Then
        GetResponse = "Here you go! "
'HalCommands = HalCommands & "<MICOFF>"
Set objWSHShell = CreateObject("WScript.Shell")
    objWSHShell.Run(""""& vrNameToPlay &"""")
pos = InStrRev(vrNameToPlay, "\") +1
file = Mid(vrNameToPlay, pos)
Const LENGTH = 27
Dim oShell  : Set oShell  = CreateObject("Shell.Application")
Dim oFolder : Set oFolder = oShell.Namespace("C:\Users\vyaco\Desktop\Hal\music")
Dim oFile : Set oFile = oFolder.ParseName(file)
Dim strLength : strLength = oFolder.GetDetailsOf(oFile, LENGTH)
param1 = "music"
param2 = strLength
objWSHShell.Run hal_commands & param1 & " " & param2
     End If
   End If
   HalBrain.ReadOnlyMode = True
End If

The last line runs the python script and sends params.
Code: [Select]
objWSHShell.Run hal_commands & param1 & " " & param2
This is my python snippet for toggling Hal's mic
Code: [Select]
##PLAY A SONG
if command == "music":
command2 = sys.argv[2]
##Mbox('debug', command + " " + command2, 1)
subprocess.Popen([r'C:\Program Files (x86)\Zabaware\Ultra Hal 7\UltraHal7.exe', '<SHOWHAL><MICOFF>'])
t = command2
h,m,s = re.split(':',t)
print int(datetime.timedelta(hours=int(h),minutes=int(m),seconds=int(s)).total_seconds())
duration = int(datetime.timedelta(hours=int(h),minutes=int(m),seconds=int(s)).total_seconds())
##print command2
voice = open(voice_modulator,"w")
voice.writelines("turnoff")
voice.close()
##Mbox('duration', str(duration), 0)
time.sleep(duration)
voice = open(voice_modulator,"w")
voice.writelines("turnon")
voice.close()
subprocess.Popen([r'C:\Program Files (x86)\Zabaware\Ultra Hal 7\UltraHal7.exe', '<SHOWHAL><MICON>'])

So i need to be able to control Hal's mic via python

39
Ultra Hal 7.0 / Re: Tell Hal to stop listening?
« on: March 25, 2019, 06:28:47 pm »
Thats a good plugin but i need to be able to control Hal's mic externally.  Example would be if I tell Hal to play a song i would want Hal to turn off his mic while the song is playing then when the song is over turn his mic back on. I have a python script that will get song's length, i want to be able to use python to execute "Ultrahal.exe <SHOWHAL><MICON>" using the command prompt after the song ends. The problem is if Hal is already open, calling Ultrahal.exe <SHOWHAL><MICON> will only show Hal and not enable his mic :(

Any idea's on how to make something like this work?


40
Ultra Hal 7.0 / Re: How to add a timer in Hal script?
« on: March 05, 2019, 02:29:15 pm »
I'll check it out

41
Ultra Hal 7.0 / Re: How to add a timer in Hal script?
« on: March 04, 2019, 04:38:38 pm »
Thanks for the reply Art! How does this code constantly check the values. Would this code be wrapped in a loop?

42
Ultra Hal 7.0 / How to add a timer in Hal script?
« on: March 04, 2019, 10:15:04 am »
I need to add a countdown timer in a Hal plugin im creating, but it doesn't seem that WScript.Sleep is available within Hals script. Not sure why but i get an object error. Has anyone tried working with timers in Hal's script before? I want something like the following:

WScript.Sleep 5000
HalCommands = HalCommands & "<MICOFF>"

So after 5 seconds turn off Hal's mic.


43
Ultra Hal 7.0 / Re: Tell Hal to stop listening?
« on: February 28, 2019, 10:22:28 am »
Thanks for the response! I was hoping there was also a programmatic way of having Hal stop listening but I assume <MICON> and <MICOFF> would work.

44
Ultra Hal 7.0 / Tell Hal to stop listening?
« on: February 27, 2019, 10:58:53 am »
Hi Guys,

Is there a command like <MICON> to have Hal stop listening? When I have speech recognition on and i tell Hal to play a song, i'd like him to stop listening, otherwise he responds to the song lyrics haha. If i turn the mic off then i cant turn it back on unless i type it in. I was hoping for some kind of command (function) to execute when i tell Hal to play a song then when the song is done i can say "start listening". Im pretty sure there is something like this already but i'm not sure what it was  :-\

45
Ultra Hal 7.0 / Re: Robert - Starting Hal with microphone enabled?
« on: February 27, 2019, 10:41:03 am »
Yes, that will work

Pages: 1 2 [3] 4 5 ... 11