Window Management - Interest?

Topics: Developer Forum, User Forum
Developer
Feb 14, 2007 at 7:02 PM
Edited Jul 13, 2007 at 4:52 AM
So yeah, anyway ... I've been playing around with cmdlets, and as a shell geek, I couldn't help wondering why there wasn't a way to enumerate windows and move them around ... so I wrote one -- and I'm wondering if its something PSCX would like to include ;)

Well, technically, I'm writing one. I wrote Get-Window and Remove-Window, and the Win32.Window class which lets you close, move, resize, maximize etc ... but I'm still working on a Move-Window cmdlet to actually give pipe-line access to those features (right now, Move-Window's sole feature is that it can tile windows vertically or horizontally with percentages specified by you -- and it's parsing of these is a little weak right now).

What do I mean?

for( $i = 0; $i -lt 3; $i++) { notepad }
get-window *notepad* | move-window "20%,30%,50%"
get-window *notepad* | remove-window

notepad
$np = get-window *notepad*
$np.Move( 20, 20, 200, 300 )
$np.Maximize()
$np.Restore()
$np.Close()

I put it up on my site for now (just so y'all can see it if you want), but as I said, there's more work to be done - at least on the Move-Window ... and I'm open to suggestions. Download

Joel "Jaykul" Bennett
Developer
Feb 14, 2007 at 7:39 PM
Wow, great! That would add much more value to our current Get-ForegroundWindow. Unfortunately, I am not able to download the code, the server keeps returning a forbidden error.
Developer
Feb 14, 2007 at 7:40 PM
Whoops. Stupid FTP client. (fixed that)
Developer
Feb 14, 2007 at 7:42 PM
thanks :)
Developer
Feb 14, 2007 at 7:55 PM
I am looking through your code, and it looks great. I hope Keith gives you access soon, so you can start integrating them with PSCX right away :)
Developer
Feb 18, 2007 at 4:27 PM
Keith?
Coordinator
Feb 18, 2007 at 7:12 PM
Done. BTW would these cmdlets go in 1.1 or 1.2? We have that book we would like to get PSCX into so it would be nice to finish up what we have for the 1.1 release.
Developer
Feb 18, 2007 at 8:05 PM
definitely 1.2. there is going to be a lot of work to integrate these with our infrastructure. and we need to modify the base classes a bit, see Move PscxInputObjectPathCommand functionality to PscxCmdlet
Jun 29, 2007 at 12:42 PM

jachymko wrote:
Wow, great! That would add much more value to our current Get-ForegroundWindow. Unfortunately, I am not able to download the code, the server keeps returning a forbidden error.


Download link broken again? This didn't make it into 1.1.1 obviously. Still plans for it to be in 1.2?
Coordinator
Jun 29, 2007 at 3:53 PM
Yeah 1.1.1 was meant to primarily address defects. Hopefully Jaykul will add this code to the trunk for the next release.
Developer
Jul 13, 2007 at 4:57 AM
Edited Jul 13, 2007 at 4:57 AM
Whoops (fixed the link). I've been meaning to talk to you on IRC about what I need to do "to integrate these with our infrastructure" ... particularly if there's somewhere specific I should check in the helper Win32 Interop stuff