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
hbcontrol.exe
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: hbcontrol.exe
Why not use HBControlMod.dll?
Osler
Osler
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: hbcontrol.exe
Good call. Using that now. Not even sure why I didn't think of that. Thanks!
Question remains though
Question remains though
Re: hbcontrol.exe
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.Richard Naninck wrote:Question remains though
Scott
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: hbcontrol.exe
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..
-
- HouseBot Guru Extraordinaire
- Posts: 1121
- Joined: Tue Sep 28, 2004 7:49 am
- Location: The Netherlands
Re: hbcontrol.exe
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
There's a couple of ways to pipe the output of a command to a variable, the long way:
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
Code: Select all
command.exe > temp.txt
set /p test = < temp.txt
del temp.txt
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`
Terry