Come to find out from one of my perl books, translating VB to perl is not that difficult (for some that is)
I was wondering if any of you VB guru's would be willing to help me figure this out.
What I want to do is add the capabilitily to my perl program to monitor x10 traffic.
The perl examples in the sdk only show how to turn items on and off and do queries.
I can do all that no problem, I just need to monitor x10 traffic and get the module traffic info - eq -
recvplc f2 offI am looking at the VBActiveHome.vb file in the VBActiveHome folder. I only need to translate the bits that monitor the x10 traffic from this file.
VB has access to OLE and perl uses the perl module Win32::OLE
Here is what my perl book says about translating VB to perl.
Visual basic also uses a CreateObject call to create automated objects.
VB uses a set statement - eg
set Message = *****
perl just uses a normal assignement - eg
$Message = ******
VB references properties and methods using the dot operator - eg
Mesage.Subject = "Subject"
perl uses the pointer arrow for methods and the pointer arrow and a hash for properties - eg
$Message->{Subject} = "Subject";
Looks to me like this line in the x10 VB file
ActiveHomeObj = CreateObject("X10.ActiveHome")
translates to this in perl
use Win32::OLE;
$ActiveHomeObj = new Win32::OLE('X10.ActiveHome');
Can anyone edit the VbActiveHome.vb file down so that it is only an x10 monitor program and get rid of the send x10 commands section.
I don't need the VB monitor to be a subroutine, just the basic code.
I'll try my best to do the translation and see what I can come up with.
Thanks so much for any help.
Doug