hello-TikTok.ps1

<#
.SYNOPSIS
Displays customized text in a Popup window with a triple-color blinking animated text.
 
.DESCRIPTION
Script to display customizable text using the .NET Framework with a triple-color blinking text effect for a visually engaging presentation.
 
.INPUTS
Text - The text to display in the animation.
 
.OUTPUTS
Popup Window to dislpay message in TiKTok Style
 
.EXAMPLE
PS> .\hello-TikTok.ps1 -Text "Custom Message"
#>



<#PSScriptInfo
 
.VERSION 1.2.0
 
.GUID 03cb458a-ddcc-45c7-9d49-f50bcfe819b5
 
.AUTHOR Larry Billinghurst
 
.COMPANYNAME TriFused
 
.COPYRIGHT 2024
 
.TAGS TikTok, Popup
 
.LICENSEURI
 
.PROJECTURI
 
.ICONURI
 
.EXTERNALMODULEDEPENDENCIES
 
.REQUIREDSCRIPTS
 
.EXTERNALSCRIPTDEPENDENCIES
 
.RELEASENOTES
 Added text input, third color and fade effects
 
 
.PRIVATEDATA
 
#>

param(
    [string]$Text = "Hello TikTok"
)

# Load WPF libraries
Add-Type -AssemblyName PresentationFramework, PresentationCore, WindowsBase

# Define XAML for the WPF window and controls with blinking animations
$xaml = @"
<Window xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
        xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'
        Title='$Text from TriFused' Height='280' Width='1000'
        WindowStartupLocation='CenterScreen'>
    <Grid Background='Black'>
        <TextBlock Text='$Text' Foreground='Red' FontSize='160'
                   FontFamily='Arial' FontWeight='Bold' Margin='35,33,0,0'>
            <TextBlock.Triggers>
                <EventTrigger RoutedEvent='FrameworkElement.Loaded'>
                    <BeginStoryboard>
                        <Storyboard RepeatBehavior='Forever'>
                            <DoubleAnimation Storyboard.TargetProperty='Opacity'
                                             From='0' To='1' Duration='0:0:1' AutoReverse='True'/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </TextBlock.Triggers>
        </TextBlock>
        <TextBlock Text='$Text' Foreground='#00E1FF' FontSize='160'
                   FontFamily='Arial' FontWeight='Bold' Margin='32,30,0,0'>
            <TextBlock.Triggers>
                <EventTrigger RoutedEvent='FrameworkElement.Loaded'>
                    <BeginStoryboard>
                        <Storyboard RepeatBehavior='Forever'>
                            <DoubleAnimation Storyboard.TargetProperty='Opacity'
                                             From='0' To='1' Duration='0:0:1' AutoReverse='True' BeginTime='0:0:0.5'/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </TextBlock.Triggers>
        </TextBlock>
        <TextBlock Text='$Text' Foreground='White' FontSize='160'
                   FontFamily='Arial' FontWeight='Bold' Margin='29,28,0,0'>
            <TextBlock.Triggers>
                <EventTrigger RoutedEvent='FrameworkElement.Loaded'>
                    <BeginStoryboard>
                        <Storyboard RepeatBehavior='Forever'>
                            <DoubleAnimation Storyboard.TargetProperty='Opacity'
                                             From='0' To='1' Duration='0:0:1' AutoReverse='True' BeginTime='0:0:1'/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </TextBlock.Triggers>
        </TextBlock>
    </Grid>
</Window>
"@


# Parse the XAML, replacing placeholders with actual parameter value
$xaml = $xaml.Replace("`$Text", $Text)

# Create a WPF window using XamlReader
$window = [Windows.Markup.XamlReader]::Parse($xaml)

# Show the WPF window
$window.ShowDialog()