Mittwoch, 7. Januar 2009

$psIse.CustomMenu - undocumented features

Hello again.

Having CustomMenu, but no Remove() ?
Using my fingers instead of my brain I tried command completions on $psIse.CustomMenu.Submenus.R - Tab and there it was.

After a little break I just did

$psIse.CustomMenu.Submenus.PSBase | gm

Finaly I had:

$psIse.CustomMenu.Submenus.Add("_Dir", {dir}, "Ctrl+M")
# Yet I have no sane example how to use the next one
#$psIse.CustomMenu.Submenus.Insert($pos, $psMenuItem)

My Wishlist for further ISE Extensions
  • Custum context-menues
  • A way to determin which pane has the focus, the inverse to Focus() of Editor Objects
  • folding
  • custum syntax coloring
  • a way a read the input from the command pane, enabeling to write ones owns read execute display loops
  • and some hooks, i.e. events pane switch or whatever it might be called, saveas , open etc.

Enjoy discovering


1 Kommentar:

  1. NB: this set of thigns only works on CTP (ie pre-release) versions of PowerShell - they do not work on the final version since MS changed the object model.