DCSIMG
Windows PowerShell ISE screenshot capture - Shay Levy

Shay Levy

If you repeat it, PowerShell it!

News


btn_donate_LG

View Shay Levy's profile on LinkedIn Follow Shay Levy at Twitter Shay Levy's Facebook profile Subscribe to my FriendFeed


site statistics




Windows PowerShell ISE screenshot capture

This function makes a screenshot of ISE. It sends the ALT-PRINTSCREEN keystroke to capture the active window into memory and opens MSPaint.exe so you can paste the capture into, it also registers CTRL+1 as a shortcut key.

Paste the code into ISE and run it: 

  1. function Capture-ISEScreen  
  2. {  
  3.     [System.Windows.Forms.SendKeys]::SendWait("%{PRTSC}")  
  4.     Start-Process mspaint  
  5. }  
  6.  
  7. # create shortcut key  
  8. $null = $psIse.customMenu.subMenus.add("Capture-ISEScreen",{Capture-ISEScreen},"CTRL+1"

 

 

The “Custom” menu updates and now shows the function name and shortcut key. Now simply press CTRL+1 to capture the editor window.

capture

Comments

Glenn said:

Okay, now that is cool!

# March 8, 2009 5:48 PM

Ego said:

Wer haette das gedacht!

# May 22, 2009 10:59 PM
Leave a Comment

(required) 

(required) 

(optional)

(required) 


Enter the numbers above: