Automating an OmniEngine using Perl

A place for developers to exchange information about extending OmniPeek, and ask technical questions about plugins on MyPeek, scripting, and programming.
Posts: 78
Joined: Thu May 22, 2008 9:36 am

Automating an OmniEngine using Perl

Postby Spacepacket » Wed Jun 16, 2010 3:43 pm

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

Return to “Developers”

Who is online

Users browsing this forum: No registered users and 1 guest