PowerShell/Scripts/repeat-last-reply.ps1

23 lines
480 B
PowerShell
Raw Normal View History

2021-12-06 18:48:32 +01:00
<#
.SYNOPSIS
Repeats the last reply
.DESCRIPTION
This repeats the last reply by text-to-speech (TTS).
.EXAMPLE
PS> ./repeat-last-reply
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
https://github.com/fleschutz/PowerShell
#>
if (test-path "$env:TEMP/last_reply.txt" -pathType leaf) {
2021-12-06 18:55:29 +01:00
$Reply = "It was: "
$Reply += Get-Content "$env:TEMP/.last_reply.txt"
2021-12-06 18:48:32 +01:00
} else {
$Reply = "Sorry, I can't remember."
}
& "$PSScriptRoot/give-reply.ps1" "$Reply"
exit 0 # success