Professional Documents
Culture Documents
0
Created by http://powershellmagazine.com
The $psISE scripting object model provides events when a property or collection changes within ISE. These events are
$psISE. CurrentVisibleVerticalTool
usually named as PropertyChanged or CollectionChanged based on the object.
The $psISE.CurrentVisibleHorizontalTool and
$psISE.CurrentVisibleVerticalTool objects are For example, the following code adds an add-on menu to all newly opened PowerShell tabs:
available only when an add-on--for example, the Register-ObjectEvent -InputObject $psise.PowerShellTabs -EventName CollectionChanged -Action {
ShowCommands add-on--is visible in ISE. if ($event.SourceEventArgs.Action -eq "Add") {
$event.Sender[1].AddOnsMenu.SubMenus.Add("Select _Line",{$psISE.CurrentFile.Editor.SelectCaretLine()},"Alt+L") } }