Using QuickClick Solutions in Beta2

PowerShell Plus Beta2 has a significant new feature: QuickClick solutions. Since it is new and pretty cool, I'd like to give you a quick walk-through.

QuickClick Solutions are trees that can store either simple one-liner commands or complex scripts. With a QuickClick Solutions Tree, you can

  • Reminder: quickly and conveniently save commands you often need
  • Organizer: use the tree as your personal PowerShell script organizer
  • Solutions Pack: transfer knowledge from an experienced PS user to beginners
  • Demo: create interactive demos
  • Share: share PowerShell expertise from a specific area with others


 

Showing And Hiding QuickClick Solutions

To show or hide the QuickClick Solutions panel, simply hit CTRL+I or use View-QuickClick Solutions. Note that this feature was introduced in version 2.1.0.45 (Beta2). You may want to upgrade to that version.

The tree panel is a regular docking window so you can pin, dock and undock the panel. However, the best way is to keep the tree docked at the left side and use CTRL+I to show and hide when necessary. Position your mouse cursor over the right border of the docked control to make it wider.

Using Existing QuickClick Solutions

From an end-users perspective, all you need to do is to expand a QuickClick solutions tree and select the command you would like to try. When you hover over a node, a tooltip appears and shows you a preview of the code stored in this node, along with a description (if the node has one).

You can either double-click a selected tree node or select it and press ENTER. In both cases, the command stored inside the selected node is typed into your console. Press ENTER again to actually execute the code.

Note: The tree will never execute code right away because you and only you can decide whether code is beningn or not and whether you want to execute it. This is why the tree only inserts code into the console but leaves it to you to actually press ENTER to execute it. If you must execute code in  one step, hold CTRL while double-clicking a node.

There are a couple of tricks you can use:

  • When you insert a node code by pressing ENTER, you typically press ENTER again to try out the code. Then, you can press TAB to return selection back to the tree. This way, you do not need to use the mouse to work your way through a tree.
  • You can drag & drop a node into any text-based program that accepts text drag&drop such as the script editor.

Reorganizing Your Tree

You can easily reorganize your tree in any way you want. Simply drag and drop tree folders or tree nodes to other locations in your tree. This way, you can change order, place items inside a container, etc.

To delete folders or nodes you no longer need, select them and press DEL.

Note: Currently, you cannot select more than one item in the tree which is a limitation of the underlying treeview control.

Adding New Items To Your Tree

Your QuickClick Solutions Tree can grow. To add new folders or items, right click the folder or item you would like to use as a starting point, then choose New in the context menu. Or, use these keyboard shortcuts:

CTRL+SHIFT+F: New Folder
CTRL+SHIFT+L: New One-Liner
CTRL+SHIFT+N: New Script

To rapidly add code to your tree, you can also create a new one-liner that automatically contains the text you entered into the console or a script that contains the script actively open in the script editor.

Here is how you add a new one-liner:

  1. Play with code in the interactive console until it really works the way you like.
  2. Press ARROWUP to bring back the code you entered last into the console
  3. Press CTRL+SHIFT+C to create a new One-Liner node in your solutions tree. Its name is selected so you can immediately assign it a new name.
  4. Optionally, drag and drop the new node to a better position in your tree
  5. Whenever you select your new item and press ENTER, the code you saved is typed into the console

With this approach, you can rapidly create demos, too.

And here is how you add a new script node:

  1. Open the built-in editor, i.e. press CTRL+E
  2. Load a script, or create a script and make sure you save it
  3. Go back to the console, and press CTRL+SHIFT+S. A new script item is inserted into the tree. Its name is selected so you can assign a better name.

Note: When you insert a script into the tree, the node gets a blue PS icon. This is a script link. The node points to your actual script. Script nodes are a great way for you to organize your PowerShell scripts because once you have inserted a script file into the tree, you can safely drag&drop it inside the tree and categorize it into whatever folder you want without touching the original script the node points to.

To make organizing even easier, you can also drag and drop PS1 script files right into the tree.

Alternatively, you can embed scripts into the tree, too. This way, the tree stores the script code, and the external script reference is no longer needed. Embedding scripts is cool when you plan to share your tree with others. To embed a script, right-click it and choose Embed. It turns into a green icon.

Creating A New QuickClick Solutions Tree

You can create and use as many QuickClick Solutions trees as you want. To create a new tree, To create a new solutions tree, right-click the name of an existing tree and choose Add New. A submenu opens:

  • Blank Panel: opens a new blank panel. This is best when you plan to create a new panel from scratch
  • Load Panel: enables you to open a panel you saved before. Use this if you share trees and would like to load a new one you have received from a friend
  • Factory Default: Preloads the standard panel we ship with the product

Note: You can copy and paste items between trees. Simply select a node or container, then press CTRL+C to copy. Select a different panel and different tree, and press CTRL+V to insert the selected item.

Exporting Trees To Share With Others

To export a tree, all you really need to do is to save it as XML to file. Right-click the tree to open a context menu with the Save As-command. Once saved, you simply share the XML file with others (see below).

Note: When you export a tree, make sure you convert all script nodes to embedded scripts so you do not break links between your tree and external scripts. There is currently no way to do that automatically yet.

Do not use Save As and save the tree to a USB stick directly because when you remove the stick and restart PowerShellPlus, it would no longer find the tree file and remove it automatically from your panels.

Loading And Merging Panels

The best way of loading new trees is by dragging and dropping one or more XML definition files into the QuickClick Solutions panel. You then get options:

  1. Merge: The content is merged into the existing tree. This way, you can add new items to an existing tree
  2. Replace: The current tree is closed and the new one loaded instead
  3. New Panel: The new tree is opened inside a new panel

Note: There is still a bug. When you choose Cancel, the tree is still loaded.

Call To Action

Please let us know what you think and share feedback: Visit Beta Place

To read more about PowerShell Plus Beta2 and where to get it, here are all details.

Have a lot of fun,

may the PowerShell be with you,

-Tobias

 

 


Posted Mar 09 2009, 10:16 AM by Tobias Weltner

Comments

Using QuickClick Solutions in Beta2 - Dreaming in PowerShell b…/b | Free Full Rapidshare Downloads wrote Using QuickClick Solutions in Beta2 - Dreaming in PowerShell b…/b | Free Full Rapidshare Downloads
on 03-10-2009 7:47 AM

Pingback from  Using QuickClick Solutions in Beta2 - Dreaming in PowerShell b…/b | Free Full Rapidshare Downloads

fakher wrote re: Using QuickClick Solutions in Beta2
on 01-04-2010 4:23 PM

Great! this is a cool feature. I can easily add my favorites!

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.