Page 1 of 1
hbcontrol.exe
Posted: Mon Jul 20, 2009 1:43 pm
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
Re: hbcontrol.exe
Posted: Mon Jul 20, 2009 7:12 pm
by Osler
Why not use HBControlMod.dll?
Osler
Re: hbcontrol.exe
Posted: Tue Jul 21, 2009 6:52 am
by Richard Naninck
Good call. Using that now. Not even sure why I didn't think of that. Thanks!
Question remains though
Re: hbcontrol.exe
Posted: Tue Jul 21, 2009 2:23 pm
by ScottBot
Richard Naninck wrote:Question remains though
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.
Re: hbcontrol.exe
Posted: Tue Jul 21, 2009 2:29 pm
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..
Re: hbcontrol.exe
Posted: Tue Jul 21, 2009 2:40 pm
by ScottBot
Maybe you can pipe the output into a file and then read the file.
Re: hbcontrol.exe
Posted: Tue Jul 21, 2009 3:05 pm
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
Re: hbcontrol.exe
Posted: Tue Jul 21, 2009 8:05 pm
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
with the same results as the top example.
Terry