reference:scripting_reference:scripting_events:onsourcedestchange

The OnSourceDestChange event can be implemented by a script add-in to receive notification whenever a tab's source/destination state changes.

Method Name: OnSourceDestChange

Argument Type:

SourceDestData 

Return Type:

none

Description:

The SourceDestData.tab property identifies the tab, and the source and dest properties identify the new state (if both are False it means the tab is "off" - this can only happen in a single file-display Lister).