Update export-to-serenade.ps1 and list-cli-tools.ps1

This commit is contained in:
Markus Fleschutz 2021-11-30 10:34:53 +01:00
parent 304d2fc265
commit ba17f5b5e4
2 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<#
.SYNOPSIS
Exports all scripts to Serenade
Exports scripts to Serenade
.DESCRIPTION
This script exports all PowerShell scripts to Serenade to execute them by voice.
.PARAMETER WakeWord
@ -37,7 +37,7 @@ try {
foreach ($Script in $Scripts) {
$ScriptName = $Script.basename
$Keyword = $ScriptName -replace "-"," "
"serenade.global().command(`"$($WakeWord.toLower()) $Keyword`", async (api) => { await api.focusOrLaunchApplication(`"$Application`"); await api.typeText(`"$ScriptName.ps1`"); await api.pressKey(`"return`"); });" | Add-Content "$TargetFile"
"serenade.global().command(`"$($WakeWord.toLower()) $Keyword`",async(api)=>{await api.focusOrLaunchApplication(`"$Application`");await api.typeText(`"$ScriptName.ps1`");await api.pressKey(`"return`");});" | Add-Content "$TargetFile"
}
[int]$Elapsed = $StopWatch.Elapsed.TotalSeconds

View File

@ -107,6 +107,7 @@ function ListTools {
CheckFor perl "--version"
CheckFor ping "-V"
CheckFor ping6 "-V"
CheckFor powershell "--version"
CheckFor print ""
CheckFor printf "--version"
CheckFor python "--version"
@ -169,7 +170,7 @@ function ListTools {
}
try {
ListTools | format-table -property @{e='Name';width=12},@{e='Version';width=15},@{e='Location';width=45},@{e='FileSize';width=10}
ListTools | format-table -property @{e='Name';width=12},@{e='Version';width=15},@{e='Location';width=50},@{e='FileSize';width=10}
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"