Zabaware Support Forums
Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: Quixote on April 29, 2004, 06:24:19 pm
-
Hi guys and girls, i'm new to this site/forum, but it looks really interesting.
I browsed through pretty much every page looking for a way to send events to another program when I say(type) certain phrases. I enjoy home automation as a hobby, and would like to have Hal perform certain tasks for me. I have another program that can carry out macros and handle the brunt of the work, but I will need to trigger events by targeting that program and sending it certain keystrokes and key combinations. I'm just trying to figure out if Hal is what I'm looking for before I shell out the bux. :D
Also, if you can give me any pointers, please do, but please keep them fairly simple, because I am by no means a computer scientist. :)
-
quote:
Originally posted by Quixote
Hi guys and girls, i'm new to this site/forum, but it looks really interesting.
I browsed through pretty much every page looking for a way to send events to another program when I say(type) certain phrases. I enjoy home automation as a hobby, and would like to have Hal perform certain tasks for me. I have another program that can carry out macros and handle the brunt of the work, but I will need to trigger events by targeting that program and sending it certain keystrokes and key combinations. I'm just trying to figure out if Hal is what I'm looking for before I shell out the bux. :D
Also, if you can give me any pointers, please do, but please keep them fairly simple, because I am by no means a computer scientist. :)
There is a way to do it but I forgot what it is called. I think it was something like X10 protocal. Just as Hal can run other programs he can be made to access other devices if they ar in his list of programs to run. Once set up you should be able to say "Hal kitchen lights on" and if that device is connected properly it should work.
Bill
-
thank you for your help, Bill, but x10 is the way i communicate with the lights. It involves sending a signal through the electrical wires to devices that are plugged in. However, I am using another program to do that along with other tasks. It is much more specialized for that sort of thing, but it does not have the "charm" of Hal. I need to be able to send codes to that program. an example would be
Message Number: 793
wParam: 0
iParam: 720896
targeted at the desktop, it mutes the sound as if you had pressed a multimedia key on an advanced keyboard.
-
With H.A.L. Products Such as HOMESEER AUTOMATED LIVING X10
HAL, I think can be used in Conjunction with. AS the HOMESEER product uses, VBS too. You can / do Get an ActiveX control with these type of products which is simular to the ActiveX control which comes with ULTRAHAL. These products have simular commands.
Set HalBrain = CreateObject("UltraHalAsst.Brain")
this Is the type of script which you would have to place into the HOMESEER product
there would be a simular script to place into the ULTRAHAL BRAIN also, preferrably into the ULTRAHAL BRAIN.
once you set the ActiveX control in ULTRAHAL You can base a FUNCTION around the HOMESEER ActiveX Ctrl COMMANDS.
SO IF HAL DETECTED ONE OF THOSE COMMANDS.
ULTRAHAL would acess the HOMESEER ActiveX Ctrl and execute the relevant script.
IE:TURN ON THE LIGHTS <HALPASSWORD>
OR
IN REVERSE
PLACE THE UltraHAL ActiveX Ctrl Into the HOMESEER Product, HMMM
IM waiting to get some of the HARDWARE for the home AUTOMATION.
IM STILL browsing for one that looks UNIVERSAL, and, is still going to be there later.
ANY SUGGEsTIONS.
HAL/MODEM & CONTROL
JUST SOME THING to THINK ABOUT.
Im investigating ACTIVEX Control Currently (MSDN)&(TECHNET)
IDEAS FROM
SPYDAZ
GOOD LUCK
-
Hi SpyDaz.
Thanks for the tips. you should look into getting the CM11A. This device can be hooked up to your PC through the serial port and be used to control X10 devices, which are pretty much the standard for affordable home-automation. you can pick one up from X10.com. As for the program that I use, I use Girder. It is extremely flexible, and simple to get the basics. I urge you to check it out at girder.nl
All I need to know is how to send a string to girder with Hal. It should be a matter of a simple command line. perhaps something to do with "send this string to this Process ID", or along those lines. I have no idea as to what syntax would be used. As soon as girder receives that string, I can then program girder to take care of the rest. all I need is a trigger for the event that I want to take place. Any help you can offer would be greatly appreciated. let me know if you have any other home automation questions. I am not an expert, but I have picked up a few things while trying to enhance my appartment...
Thanks again
-
come on guys! there must be someone here that knows VBS well enough to know the correct syntax to send a simple string of letters or a word to another program. I mean, if Hal can start up Outlook and enter email addresses into a new message, then it *must be* possible. PLEASE PLEASE PLEASE with sugar on top... HELP. This is the one thing holding me back from buying the full version and continuing my HAL appartment.
(http://forumnapoleonetlempire.webheberg.com/images/smiles/9.gif)
-
Using irate smilies isn't going to get you much help. I'm not familiar with girder, but if you reach deep into your pocket book and buy homeseer to control your x10 devices, just download the command line interface that is free if you own homeseer and it is then just a simple matter of setting up an if then command such as "turn on light x3" would run a homeseer command line from hal to pass whatever information you define to control your device. No activex knowedge required, just simple if-then run commands within hal.
Of course you would have to spend the $180 or whatever homeseer is going for now, but that is a small price for a quality control app.
-
quote:
Originally posted by lostbowyer
Using irate smilies isn't going to get you much help. I'm not familiar with girder, but if you reach deep into your pocket book and buy homeseer to control your x10 devices, just download the command line interface that is free if you own homeseer and it is then just a simple matter of setting up an if then command such as "turn on light x3" would run a homeseer command line from hal to pass whatever information you define to control your device. No activex knowedge required, just simple if-then run commands within hal.
Of course you would have to spend the $180 or whatever homeseer is going for now, but that is a small price for a quality control app.
the irate smiley was for fun. I cannot use homeseer. I have spent hours on hours programming girder. If I cannot figure out how to do it the way I want to, then I will simply abandon Ultra Hal for a similar, yet more flexible program. Thank you for your time.
-
If you could store a Keystroke (macro) in a shortcut .....
Then HAL could deffinatly RUNIT:
BILL819 is right really... HOMESEER IS Written in the same script as hal 1, and the command line feature nables HAL to use the RUNIT command 2.
OK>
SPYDAZ >>>>>>>>> GOOD LUCK
DEEP THINKING AND HARD SEARCHING IS REQUIRED (investigation)
-
Please check the following link to a girder forum.
http://www.girder.nl/phpBB2/viewtopic.php?t=6792
any pointers anyone? [:D]
-
http://www.15seconds.com/issue/040413.htm
AUTOMATING WINDOWS & OUTPUTING COMMANDS TO SERIAL PORTS IN VBSCRIPT.
CAPTURING KEYS AS STRINGS IN VBSCRIPT
MAYBE HELPFUL
XSPYDAZ
-
Thanks SPYDAZ!
you're a genius, dude. I'll try to check out the project and make sense of it. Seems to be a good lead.[:)]
-
I think that I have found a solution. There is a way to trigger events in Girder with a command line. If you run the command
C:>"C:Program Filesgirder32Girder.exe" -eventstring placeyoureventnamehere
then you can create macros and home automation commands for many different purposes (including windows operations). check this forum post...
http://www.girder.nl/phpBB2/viewtopic.php?t=2352&postdays=0&postorder=asc&highlight=vbs&start=15
can someone please review the vbs syntax to run a command from HAL by instructing it to? ty
-
http://www.fmsinc.com/products/vbsbook
There is a functiom on the forum
http://www.zabaware.com/forum/topic.asp?TOPIC_ID=1385
OPEN FILE FUNCTION :::
TRYIT and SEE.....
EVEN ADAPTIT to Your Specific Purpose.
-
'FUNCTION: Shell Statement v1.0
purpose:
The shell statement creates a new process that executes the required argument,
command. Command is any valid DOS statement.
Shell requires your server to have windows scripting host installed and proper permissions.
syntax:
Shell command
example usage:
Open the properties window of Personal Web Server (on the server)
<% Shell "c:windowssysteminetsrvpws /properties" %>
Open Notepad (on the server)
<% Shell "notepad" %>
Register a component (some.dll) on the server.
The component must already be in the specified directory
<% Shell "Regsrv32 C:WINNTSystem32some.dll" %>
Private Sub Shell(byVal command)
dim wshShell, boolErr, strErrDesc
On Error Resume Next
Set wshShell = CreateObject("WScript.Shell")
wshShell.Run command
if Err Then
boolErr = True
strErrDesc = Err.Description
end if
Set wshShell = Nothing
On Error GoTo 0
if boolErr then Err.Raise 5105, "Shell Statement", strErrDesc
End Sub
[size=12]JUST A FUNCTION TO BE ADAPTED TO RUN CUSTOM SHELL COMMANDS FROM HAL[/size=12]
good luck
SPYDAZ
PS.QUIXOTE
i put a password because hal might execute a command when you are just chatting with him.
the original script was a cutting edge script i took the password out but after deliberation i beleived that the password was the way to go.
ALSO, when you read the script <it shows you how to use the prevsent VARIABLE to validate what was said last time> THAT GIVES ME IDEAS.... for word GAMES with hal.
-
i HOPE the that THE ABOVE FUNCTION HELPS YOU execute shell commands it needs to be adapted to work with HAL bUT that is the vb for IT.
I find that VB6 / VB5 source code tends to work best.
VB.NET not so good.
I will be adapting this script to RUN A FEW ITEMS I will post them up.
GOOD LUCK
SPYDAZ
-
thanks Spydaz, you're a pal.
If you need any help with girder (I really think you ought to check that program out - it would work hand-in-hand with Hal) just let me know. I have only rudimentary knowledge of it, but I could help you get started.