From 6f70c4a0c46864b8aba4d21c323a63c69f7bcf97 Mon Sep 17 00:00:00 2001 From: Aaron Johnon Date: Sat, 7 Sep 2024 02:24:43 -0500 Subject: [PATCH] Added low voice options to batch files --- winbatch/encode-and-play.bat | 25 ++++++++++++++++++++++--- winbatch/run-numberstation.bat | 22 +++++++++++++++++++--- 2 files changed, 41 insertions(+), 6 deletions(-) diff --git a/winbatch/encode-and-play.bat b/winbatch/encode-and-play.bat index face116..4a98f8e 100755 --- a/winbatch/encode-and-play.bat +++ b/winbatch/encode-and-play.bat @@ -1,6 +1,9 @@ @echo off setlocal +:: Initialize flags +set flags= + :: Ask for the shift value set /p shift="Enter the shift value: " @@ -14,18 +17,34 @@ set /p gsize="Enter the number group size: " :: Ask whether to repeat number groups set /p repeat="Do you want to repeat number groups (y/N)? " +:: Ask whether to use the low voice +set /p lowvoice="Do you want to use the low voice (y/N)? " + :: Ask for the message input echo. echo Enter the message to encode and process: set /p input= -:: Pipe the input into nsencode.exe with the shift value, then pipe nsencode.exe's output into numberstation.exe -:: Check user input and apply the -r flag if necessary +:: Check if the user wants to repeat number groups if /i "%repeat%"=="y" ( echo Repeating number groups with the -r flag. - echo %input% | nsencode.exe -s %shift% -g %gsize% | numberstation.exe -r + set flags=%flags% -r ) else ( echo Not repeating number groups. +) + +:: Check if the user wants to use the low voice +if /i "%lowvoice%"=="y" ( + echo Using low voice with the -l flag. + set flags=%flags% -l +) else ( + echo Using default voice. +) + +:: Pipe the input into nsencode.exe with the shift value, then pipe nsencode.exe's output into numberstation.exe +if defined flags ( + echo %input% | nsencode.exe -s %shift% -g %gsize% | numberstation.exe %flags% +) else ( echo %input% | nsencode.exe -s %shift% -g %gsize% | numberstation.exe ) diff --git a/winbatch/run-numberstation.bat b/winbatch/run-numberstation.bat index 8ce7400..e6b6a6c 100755 --- a/winbatch/run-numberstation.bat +++ b/winbatch/run-numberstation.bat @@ -4,15 +4,31 @@ setlocal :: Ask whether to repeat number groups set /p repeat="Do you want to repeat number groups (y/N)? " -:: Check user input and apply the -r flag if necessary +:: Ask whether to use the losam voice +set /p lowvoice="Do you want to use the low voice (y/N)? " + +:: Initialize flags +set flags= + +:: Check if the user wants to repeat number groups if /i "%repeat%"=="y" ( echo Repeating number groups with the -r flag. - numberstation.exe -r + set flags=%flags% -r ) else ( echo Not repeating number groups. - numberstation.exe ) +:: Check if the user wants to use the low voice +if /i "%lowvoice%"=="y" ( + echo Using low voice with the -l flag. + set flags=%flags% -l +) else ( + echo Using default voice. +) + +:: Run the numberstation.exe with the appropriate flags +numberstation.exe %flags% + :: Pause before exit pause