hbcontrol.exe

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

hbcontrol.exe

Post by Richard Naninck »

Anybody:

In the helpfiles the lines below are found for getting a propertyvalue using hbcontrol.exe.
Where does the return value get stored while using this in vbscript?

Setting a value is simple, but I have no Idea how to get a property.



Getting a Property Value (System Time and Date)

hb_control /O 2345 /S HB4me /C GPV /D "System Time" /P TimeAndDate
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Re: hbcontrol.exe

Post by Osler »

Why not use HBControlMod.dll?

Osler
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: hbcontrol.exe

Post by Richard Naninck »

Good call. Using that now. Not even sure why I didn't think of that. Thanks!

Question remains though 8)
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: hbcontrol.exe

Post by ScottBot »

Richard Naninck wrote:Question remains though 8)
If you can capture the standard output (std out) from the command in VB, it should contain the return value. I have no idea how to do that though.
Scott
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: hbcontrol.exe

Post by Richard Naninck »

No idea either. I was thinking about using "command > return value" but without any luck. Glad I posted it though because the hbcontrolmod makes much more sense using in an external script. I use it to capture network packets from my camera control unit. I couldn't het PacketX to work from within HB and so I wscript(ed) it. To get the parsed result into HB I used HBControl.exe and it worked fine until I had to get some value from HB into my script..
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: hbcontrol.exe

Post by ScottBot »

Maybe you can pipe the output into a file and then read the file.
Scott
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Re: hbcontrol.exe

Post by Richard Naninck »

I am sure it would work that way. It was just not what I had in mind and while reading the help file on the hbcontrol.exe GetProperty part, it looked so simple... I am glad it isn't :wink:
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Re: hbcontrol.exe

Post by roussell »

There's a couple of ways to pipe the output of a command to a variable, the long way:

Code: Select all

command.exe > temp.txt
set /p test = < temp.txt
del temp.txt
will place the output of command.exe into and environment variable named 'test'

You can also download export.exe from http://www.xeox.com/index.php?option=co ... 28&lang=en

and use it like this

Code: Select all

export test=`command.exe`
with the same results as the top example.

Terry
Post Reply