Page 1 of 1

Automating an OmniEngine using Perl

Posted: Wed Jun 16, 2010 3:43 pm
by Spacepacket
Below is a Perl script that will create a capture from a capture template. The capture template also specifies a filter that is dynamically loaded as well.

use Win32::OLE;

$os = Win32::OLE->new('EPRCmdAPI.WPRemoteCmdMgr');
$os->Connect("", 6367, 30000 );
$xf = Win32::OLE->new('Microsoft.XMLDOM');
$xt = Win32::OLE->new("EPRCmdAPI.xmlTranslate");
$tf = $xt->Load( $xf, $xf->lastChild, "PeekFilters.FilterCollection" );
$os->SetFilters( $tf, 1 );
$ct = Win32::OLE->new("Microsoft.XMLDOM");
$cg = $os->CreateNewCaptureFromTemplate( $ct );
$os->StartCapture( $cg );
print "Done";

The script depends on the filter and capture template files that are included in the following vb script: ... .php?id=96