Automating an OmniEngine using Python

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 Python

Postby Spacepacket » Tue May 11, 2010 6:03 pm

Below is a Python script that will create a capture from a capture template. The capture template also specifies a filter that is dynamically loaded as well.

import win32com.client
oe = win32com.client.Dispatch("EPRCmdAPI.WPRemoteCmdMgr")
oe.Connect("", 6367, 30000 )
xf = win32com.client.Dispatch("Microsoft.XMLDOM")
xt = win32com.client.Dispatch("EPRCmdAPI.xmlTranslate")
xf.async = 0
tf = xt.Load( xf, xf.lastChild, "PeekFilters.FilterCollection" )
oe.SetFilters( tf, 1 )
ct = win32com.client.Dispatch("Microsoft.XMLDOM")
cg = oe.CreateNewCaptureFromTemplate( ct )
oe.StartCapture( cg )

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