I want to call a sub on the (first) active item, like this:

[vba] itm = IIf(inspector_window_is_active, _
ActiveInspector.CurrentItem, _
ActiveExplorer.Selection.Item(1))
[/vba]
How to get inspector_window_is_active?