In my last post, I showed you a teaser of an upcoming post. So, this post is about the PowerShell ISE and PowerGUI 2.1 Script Editor (PGSE) addon for uploading code to PasteBin.com. This happens to be my first WPF addon for PowerShell ISE. The PGSE version of this will soon be out. I am looking at working around a bug in PowerShell. Looks pretty hard right now. Now, coming to the subject, this addon module is written in such as way that it detects what scripting environment you are using and then extends the script editor menu options to add “Send to PasteBin” item. When you select some text in the editor and click “Send to PasteBin” or CTRL+B, the following WPF window appears. You will see the above interface in PowerShell ISE. The top text box will have the content you selected in the script editor. The remaining options are quite self-explanatory. You can read about these options at http://pastebin.com/api.php. You can use the “save preferences” button to make this addon remember you email ID, …
↧