iimGetBrowserPid

From iMacros
Jump to: navigation, search

Available in iMacros 10.4.

Retrieves the process id of the last opened browser via iimOpen.

Note: iimOpen must actually launch a new instance of the browser for iimGetBrowserPid to work. If iimOpen attaches to an existing instance, e.g. iimOpen(, False), then iimGetBrowserPid returns 0.

Syntax iMacros Browser IE Plug-in Firefox Chrome

long browser_pid = iimGetBrowserPid()

Parameters

no parameters

Examples

Visual Basic Script example:

 Dim l,i, pid
 Set iim1= CreateObject ("imacros")
 
 i=  iim1.iimOpen
 If i < 0 Then 
    msgbox iim1.iimGetErrorText()
 Else
    pid = iim1.iimGetBrowserPid()
    iim1.iimDisplay("PID = " & CStr(pid))
 End If