PowerShell/Docs/play-tetris-melody.md

159 lines
4.5 KiB
Markdown
Raw Normal View History

2023-07-29 09:55:25 +02:00
## Script: *play-tetris-melody.ps1*
2021-11-08 21:36:42 +01:00
2022-02-10 09:01:07 +01:00
This PowerShell script plays the Tetris melody.
2021-11-08 21:36:42 +01:00
## Parameters
```powershell
2023-07-29 09:45:37 +02:00
play-tetris-melody.ps1 [<CommonParameters>]
2021-11-08 21:36:42 +01:00
[<CommonParameters>]
This script supports the common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction,
WarningVariable, OutBuffer, PipelineVariable, and OutVariable.
```
## Example
```powershell
PS> ./play-tetris-melody
```
## Notes
2022-11-17 19:46:02 +01:00
Author: Markus Fleschutz | License: CC0
2021-11-08 21:36:42 +01:00
## Related Links
https://github.com/fleschutz/PowerShell
2023-07-29 09:55:25 +02:00
## Script Content
2022-11-17 20:05:34 +01:00
```powershell
2022-11-17 20:02:26 +01:00
<#
.SYNOPSIS
2023-05-26 12:20:18 +02:00
Plays the Tetris melody
2022-11-17 20:02:26 +01:00
.DESCRIPTION
2023-05-26 12:20:18 +02:00
This PowerShell script plays the Tetris melody.
2022-11-17 20:02:26 +01:00
.EXAMPLE
2023-05-26 12:20:18 +02:00
PS> ./play-tetris-melody
2022-11-17 20:02:26 +01:00
.LINK
2023-05-26 12:20:18 +02:00
https://github.com/fleschutz/PowerShell
2022-11-17 20:02:26 +01:00
.NOTES
Author: Markus Fleschutz | License: CC0
#>
[System.Console]::Beep(1320,500)
[System.Console]::Beep(990,250)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(1188,250)
[System.Console]::Beep(1320,125)
[System.Console]::Beep(1188,125)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(990,250)
[System.Console]::Beep(880,500)
[System.Console]::Beep(880,250)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(1320,500)
[System.Console]::Beep(1188,250)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(990,750)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(1188,500)
[System.Console]::Beep(1320,500)
[System.Console]::Beep(1056,500)
[System.Console]::Beep(880,500)
[System.Console]::Beep(880,500)
2023-05-26 12:20:18 +02:00
Start-Sleep -milliseconds 250
2022-11-17 20:02:26 +01:00
[System.Console]::Beep(1188,500)
[System.Console]::Beep(1408,250)
[System.Console]::Beep(1760,500)
[System.Console]::Beep(1584,250)
[System.Console]::Beep(1408,250)
[System.Console]::Beep(1320,750)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(1320,500)
[System.Console]::Beep(1188,250)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(990,500)
[System.Console]::Beep(990,250)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(1188,500)
[System.Console]::Beep(1320,500)
[System.Console]::Beep(1056,500)
[System.Console]::Beep(880,500)
[System.Console]::Beep(880,500)
2023-05-26 12:20:18 +02:00
Start-Sleep -milliseconds 500
2022-11-17 20:02:26 +01:00
[System.Console]::Beep(1320,500)
[System.Console]::Beep(990,250)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(1188,250)
[System.Console]::Beep(1320,125)
[System.Console]::Beep(1188,125)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(990,250)
[System.Console]::Beep(880,500)
[System.Console]::Beep(880,250)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(1320,500)
[System.Console]::Beep(1188,250)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(990,750)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(1188,500)
[System.Console]::Beep(1320,500)
[System.Console]::Beep(1056,500)
[System.Console]::Beep(880,500)
[System.Console]::Beep(880,500)
2023-05-26 12:20:18 +02:00
Start-Sleep -milliseconds 250
2022-11-17 20:02:26 +01:00
[System.Console]::Beep(1188,500)
[System.Console]::Beep(1408,250)
[System.Console]::Beep(1760,500)
[System.Console]::Beep(1584,250)
[System.Console]::Beep(1408,250)
[System.Console]::Beep(1320,750)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(1320,500)
[System.Console]::Beep(1188,250)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(990,500)
[System.Console]::Beep(990,250)
[System.Console]::Beep(1056,250)
[System.Console]::Beep(1188,500)
[System.Console]::Beep(1320,500)
[System.Console]::Beep(1056,500)
[System.Console]::Beep(880,500)
[System.Console]::Beep(880,500)
2023-05-26 12:20:18 +02:00
Start-Sleep -milliseconds 500
2022-11-17 20:02:26 +01:00
[System.Console]::Beep(660,1000)
[System.Console]::Beep(528,1000)
[System.Console]::Beep(594,1000)
[System.Console]::Beep(495,1000)
[System.Console]::Beep(528,1000)
[System.Console]::Beep(440,1000)
[System.Console]::Beep(419,1000)
[System.Console]::Beep(495,1000)
[System.Console]::Beep(660,1000)
[System.Console]::Beep(528,1000)
[System.Console]::Beep(594,1000)
[System.Console]::Beep(495,1000)
[System.Console]::Beep(528,500)
[System.Console]::Beep(660,500)
[System.Console]::Beep(880,1000)
[System.Console]::Beep(838,2000)
[System.Console]::Beep(660,1000)
[System.Console]::Beep(528,1000)
[System.Console]::Beep(594,1000)
[System.Console]::Beep(495,1000)
[System.Console]::Beep(528,1000)
[System.Console]::Beep(440,1000)
[System.Console]::Beep(419,1000)
[System.Console]::Beep(495,1000)
[System.Console]::Beep(660,1000)
[System.Console]::Beep(528,1000)
[System.Console]::Beep(594,1000)
[System.Console]::Beep(495,1000)
[System.Console]::Beep(528,500)
[System.Console]::Beep(660,500)
[System.Console]::Beep(880,1000)
[System.Console]::Beep(838,2000)
exit 0 # success
2022-11-17 20:05:34 +01:00
```
2022-11-17 20:02:26 +01:00
2023-07-29 09:55:25 +02:00
*(generated by convert-ps2md.ps1 using the comment-based help of play-tetris-melody.ps1 as of 07/29/2023 09:55:14)*