Powershell GUI fronted (WPF) to run categorized console scripts

⌈⌋ branch:  ClickyColoury


Check-in [e076d85d3d]

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

Overview
Comment:Swirly arrow indicator for Window title - when scripts are running.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: e076d85d3d8ced1f4ad53afa26dfab95ebe62d1d
User & Date: mario 2018-05-16 18:08:49
Context
2018-05-16
18:09
Cancel button = currently just hangs both runspaces. check-in: e419d52757 user: mario tags: trunk
18:08
Swirly arrow indicator for Window title - when scripts are running. check-in: e076d85d3d user: mario tags: trunk
18:07
New plugin manager to install contrib/ scripts. check-in: 85c87f27b5 user: mario tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added contrib/ActivityIndicator3000.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
33
34
35
# encoding: utf-8
# api: clicky
# type: init-gui
# version: 0.2
# title: ActivityIndicator3000
# description: adapts title while scripts are running
# category: ui
# state: buggy
# hidden: 1
# nomenu: 1
#
# Starts timer in Start-Win (init-gui hook). This keeps it running
# continuosly. But task only really comes into action when $GUI.tasks[]
# queue contains a script.
# Then rewrites the window title with swirly arrows while active.
#

$GUI.act = @{
    timer = [System.Windows.Threading.DispatcherTimer]::new("Background")
    step = -1
    arrows = "⇘⇩⇙⇐⇖⇑⇗⇒"
}
$GUI.act.timer.Interval = 2500
$GUI.act.timer.Add_Tick({
    if ($GUI.tasks -and ($_title = $GUI.tasks[0].title)) {
        $GUI.act.step = ($GUI.act.step + 1) % $GUI.act.arrows.length;
        $GUI.w.title = $GUI.act.arrows[$GUI.act.step] + " $($cfg.main.title) → $_title"
    }
    elseif ($GUI.act.step -ge 0) {
        $GUI.w.title = "➱ $($cfg.main.title)"
        $GUI.act.step = -1
    }
})
$GUI.act.timer.Start()