Anyone can upload a patch. Patches are evaluated by project team members and either Applied or Declined.

Status ID Uploaded By Description Work Items Action
Being evaluated
411 Oct 23 2007 at
5:46 PM
robertla One of the coolest things I've found about PS is how it's able to encapsulate different data stores. However for simply file mantaince its really quite cumbersome. This function wraps Get-ChildItem and provides you with all of the syntactical convience of DIR, the functionality of Get-ChildItem along with a few other bells and whistles.

Briefly Dir2 allows you the ability to filter by file/directory attribute and sort by name,size,... using the same syntax as DIR takes from the command prompt. Dir2 will like Get-ChildItem will take the path either via the pipeline or a parameter passed in by name or value.

For more information like at the Comment block at the top of the script or run Dir2 -? -full from the command line.

Download

Being evaluated
240 Aug 24 2007 at
6:10 PM
mihi A collection of cmdlets to get information (like title, checkbox state, classname, dialog id, and most important screen position) of elements on screen. Elements means windows (and child windows) and "accessible objects" - "things" you can interact with through a screenreader application (for blind people). In combination with the keyboard/mouse patch you can use this for more sophisticated macros.

For example:

# click start button on Windows XP, regardless in which corner it is.

$taskbar = (list-window |? {$_.ClassName -eq "Shell_TrayWnd"})
$start = ($taskbar.ChildWindows | ? {$_.DialogId -eq 304})
$center = $start.AbsoluteCenterPoint
set-mouse $center.x $center.y -Click L


# right click an icon in systray (named "Antivir Guard") on Windows XP
# and select the first menu entry

$taskbar = (list-window |? {$_.ClassName -eq "Shell_TrayWnd"})
$sysPager = (($taskbar.ChildWindows | ? {$_.DialogId -eq 303}).ChildWindows |
? {$_.ClassName -eq "SysPager"})
$infoarea = $sysPager.ChildWindows[0];
$icon=(Get-AccessibleObject $infoarea.HWnd).Children |
? {$_.Name -eq "AntiVir Guard"}
set-mouse $icon.CenterPoint.X $icon.CenterPoint.Y -Click R
send-key "{Down}{Enter}"
Download

Being evaluated
236 Aug 23 2007 at
7:57 PM
mihi Cmdlets to get mouse position, get keyboard state, create keyboard and mouse events, and to block the physical keyboard/mouse. Useful if you want to (ab)use Powershell as a macro recorder.

Download

Applied
Sep 14 2007
279 Sep 10 2007 at
9:41 PM
mihi Two cmdlets:

scroll-text is a replacement for less, which shows text as it appears. It can also show files like less, but files support everything supported by powershell. scroll-text function:* is perfectly valid.

scroll-table shows stuff similar to format-table, but you can adjust column widths and sort columns on the fly. You can also add columns (a list of all properties and methods is shown for that), so you can use it to examine unknown objects - much quicker than calling get-member over and over again. Command line option -gui will open a GUI window and show the table in a ListView in there (but the GUI version is less powerful than the command line version).

You can even pipe the output of format-table or format-list (which is undocumented by Microsoft) and the table will still look fine (all columns not selected in format-table will be lost, however).

If a table cell contains a list, you can either press Return on it to examine it in a new instance of scroll-table, or use 'x' to explode it (duplicate the row for each element in the list).
Applied Sep 14 2007 : They are in the source tree, but they will definitely need some code clean up; at least using StringBuilders instead of concatenating strings all over the place, and removing the strange "recursive call" of BeginProc/ProcessRecord/EndProc, which keeps blowing up (perhaps only in PS V2 drop).
Download

Applied
Sep 12 2007
164 Jul 24 2007 at
7:56 PM
CraigDahlinger In reference to Discussion
http://www.codeplex.com/PowerShellCX/Thread/View.aspx?ThreadId=12975


I threw it into Debug it looks like they did not put a namepace in their assembly (they meaning nsoftware, NetCmdLets)

AssemblyQualifiedName "aan, nsoftware.NetCmdlets.Commands, Version=1.0.2755.0, Culture=neutral, PublicKeyToken=cdc168f89cffe9cf" string


In TypeNameCache.cs line #158 string[] ns = type.Namespace.Split('.') throws a null reference exception because the type being passed in does not have a namespace.

If the type does not have a namespace, then it should not be added...

public void Add(Type type)
{
if (type.Namespace != null)
{
string[] ns = type.Namespace.Split('.');
Node n = this;

for (int i = 0; i < ns.Length; i++)
{
n = n.EnsureNamespace(ns[i]);
}

n.Add(new TypeNode(type.Name));
}
}
Applied Sep 12 2007 : I made changes which pretty much include this. Only difference is that the classes in the global namespace are added to the cache also.
Download

Updating...