Powershell GUI fronted (WPF) to run categorized console scripts

⌈⌋ branch:  ClickyColoury


Check-in [2bf65ee48c]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Enables little ping button - with PS Test-Connection (instead of plain ping)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:2bf65ee48cb55d28fdc26f845f1d54c3b34b9d9d
User & Date: mario 2018-05-16 18:10:47
Context
2018-05-16
18:11
Template tool to craft/prepare new user scripts. check-in: 48e6e20fbb user: mario tags: trunk
18:10
Enables little ping button - with PS Test-Connection (instead of plain ping) check-in: 2bf65ee48c user: mario tags: trunk
18:10
Workaround to override copy function for RichTextBox - copy selected content as text/plain instead of RTF. check-in: bc311320b6 user: mario tags: trunk
Changes

Added contrib/ComputerPingBtn.ps1.

































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# encoding: utf-8
# api: clicky
# type: init-gui
# version: 0.1
# title: Ping button
# description: enables the little ping button atop hostname field in toolbar
# category: ui
# state: stable
# hidden: 1
# nomenu: 1
#
# Enables the ping icon (right hand) in the machine/hostname toolbar.
#

$GUI.w.findName("BtnComputerPng").add_Click({
    $GUI.machine.Background = "Yellow"

    $m = $GUI.machine.Text
    if ($t = Test-Connection $m -Count 1 -ErrorAction SilentlyContinue -ErrorVariable err) {
        $col="#5599ff99"
    }
    else {
        $col="#55ff7755"
        $t = New-Object PSObject -Prop @{Address=$m;Statuscode=$err.Exception}
    }

    $t = $t | FL Address,BufferSize,NoFragmentation,PrimaryAddressResolutionStatus,ProtocolAddress,ReplyInconsistency,ReplySize,ResponseTime,StatusCode,Timeout,TimeToLive,TypeofService,PSComputerName,IPV4Address,IPV6Address | Out-String
    Out-Gui -F $col -B "#ee070f1f" ($t.trim())

    $GUI.machine.Background = $col
})