Episode 60 – Scripting UI with Joel Bennett and James Brundage

22 02 2009

A Podcast about Windows PowerShell.

Listen:

In This Episode

Tonight on the PowerScripting Podcast we talk with Joel Bennett and James Brundage about scriptable user interfaces.

News

 

 

When it comes to scripting, you’re a warrior. But mighty warriors need mighty tools! For awesome PowerShell scripting, nothing matches the might of Quest’s PowerGUI. Versatile and easy to use, PowerGUI helps you build commanding scripts that leverage PowerShell’s strength across the enterprise. Now, ruling your domain is easier than ever.

Is your scripting might equal to the challenge? Put the power in your hands – download PowerGUI today

Interview 

 

 

This segment is brought to you by Idera:

Want to make Windows PowerShell easier than ever to learn and master? Checkout Idera’s PowerShellPlus Professional Edition which is now available for download! The new version has vastly improved code completion and a slick interactive Learning Center. Go to www.idera.com/PodcastPeople to get your copy today!

 

  • dougchase : ## What do we need to do to get started with this stuff?
  • jkavanagh58 : ## Is PrimalForms WPF?
  • dougchase : ## Does it work in V1 and how do I implement it in V1?  Seems like I read it worked in both versions but I couldn’t figure out how to start using it in V1.
  • ChadMiller : ##Haven’t looked at WPF. Can you write a web page in WPF like powershellasp?
  • rfoust : ## can you recommend a site to understand the basics of WPF?
  • hal: Will these scriptable UI tools be able to replace HTA?
  • jasonmarcher : ## How easy is it to create data templates and add them to existing tools/controls

 

New-Grid -Rows 5 {    
    New-Label “Please Enter Your Name” 
    New-TextBox -Name YourName -Row 1 
    New-Label “Sex:” -Row 2
    New-StackPanel -Row 3 {
        New-RadioButton -Content “Male” -IsChecked $true 
        New-RadioButton -Content “Female” -Column 1
    }
    New-Button “Done” -Row 4 -On_Click { 
        $yourName = $window | Get-ChildControl YourName 
        $sex = $window | 
            Get-ChildControl | 
            Where-Object {
               $_ -is [Windows.Controls.RadioButton] -and
               $_.IsChecked
            } | 
            Foreach-Object {
                $_.Content
            }
        if (-not $yourName.Text) {
            [Windows.Messagebox]::show(“Who are you?”)
        }
        $global:information = New-Object Object |
            Add-Member NoteProperty Name $yourName.Text -PassThru |
            Add-Member NoteProperty Sex $sex -PassThru        
        $window.Close()
    }
} -show

Resources

This segment is brought to you by SAPIEN Technologies.

 

Tips 

Gotcha

  • Kirk Munro has an awesome blog post talking about a quite wicked gotcha involving quoting rules and escape characters.

 

Advertisements

Actions

Information

One response

24 02 2009
sapientech

Just a couple of points of clarification with regards to PrimalScript 2009 and related products. http://www.primaltools.com is a new unifying site that brings together all of our software sites under one domain. While we previously had http://www.primalscript.com and http://www.primalscope.com, etc, all of our software information can now be found at http://www.primaltools.com. http://www.scriptingoutpost.com is still the place where the software can be purchased.

Also, while some of the tools at primaltools.com are stand-alone versions of specific functionality found in PrimalScript, this functionality STILL EXISTS in PrimalScript. The stand-alone tools are, for the most part, extensions of the functionality in PrimalScript, and are targeted at people who may need that functionality in addition to PrimalScript or for those that do not do any scripting, but may have specific needs fulfilled by these tools.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s




%d bloggers like this: