mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-03-26 22:36:12 +01:00
Add hi.ps1 and check-my-balance.ps1
This commit is contained in:
parent
4e5cd0a94e
commit
0f4b7a68a7
@ -25,7 +25,7 @@ More supported voice commands are:
|
|||||||
|
|
||||||
`Computer, check` [name]
|
`Computer, check` [name]
|
||||||
------------------------
|
------------------------
|
||||||
* lets the computer check something - replace [name] by: `CPU`, `date`, `DNS`, `drives`, `Earth` (fun), `operating system`, `ping`, `swap space`, `time`, `time zone`, `up-time`, `VPN`, or `weather`.
|
* lets the computer check something - replace [name] by: `CPU`, `date`, `DNS`, `drives`, `Earth` (fun), `my balance` (fun), `operating system`, `ping`, `swap space`, `time`, `time zone`, `up-time`, `VPN`, or `weather`.
|
||||||
|
|
||||||
`Computer, open` [name] `browser`
|
`Computer, open` [name] `browser`
|
||||||
---------------------------------
|
---------------------------------
|
||||||
@ -103,6 +103,7 @@ More supported voice commands are:
|
|||||||
|
|
||||||
💬 Conversation Commands
|
💬 Conversation Commands
|
||||||
-------------------------
|
-------------------------
|
||||||
|
* `Computer, Hi`
|
||||||
* `Computer, good morning`
|
* `Computer, good morning`
|
||||||
* `Computer, good evening`
|
* `Computer, good evening`
|
||||||
* `Computer, good night`
|
* `Computer, good night`
|
||||||
|
22
Scripts/check-my-balance.ps1
Normal file
22
Scripts/check-my-balance.ps1
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Checks the balance (fun)
|
||||||
|
.DESCRIPTION
|
||||||
|
This script checks the balance and replies by text-to-speech (TTS).
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./check-my-balance
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz · License: CC0
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
#>
|
||||||
|
|
||||||
|
try {
|
||||||
|
$Reply = "OK, what's your account number?"
|
||||||
|
"✔️ $Reply"
|
||||||
|
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||||
|
exit 0 # success
|
||||||
|
} catch {
|
||||||
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
exit 1
|
||||||
|
}
|
22
Scripts/hi.ps1
Normal file
22
Scripts/hi.ps1
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<#
|
||||||
|
.SYNOPSIS
|
||||||
|
Replies to "Hi"
|
||||||
|
.DESCRIPTION
|
||||||
|
This script replies to "Hi" by text-to-speech (TTS).
|
||||||
|
.EXAMPLE
|
||||||
|
PS> ./hi
|
||||||
|
.NOTES
|
||||||
|
Author: Markus Fleschutz · License: CC0
|
||||||
|
.LINK
|
||||||
|
https://github.com/fleschutz/PowerShell
|
||||||
|
#>
|
||||||
|
|
||||||
|
try {
|
||||||
|
$Reply = "Hello, how can I help?"
|
||||||
|
"✔️ $Reply"
|
||||||
|
& "$PSScriptRoot/speak-english.ps1" "$Reply"
|
||||||
|
exit 0 # success
|
||||||
|
} catch {
|
||||||
|
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"
|
||||||
|
exit 1
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user