@aaaaa12345, this is a method you could use TRIGGERcmd to say something any time.
Alexa routines can execute commands by flipping the TRIGGERcmd virtual switches that the TRIGGERcmd Smart Home skill creates for each command, but routines can also execute commands using the original TRIGGERcmd skill using the "custom" action like this:
alexa routine
The routine will run a command using the original TRIGGERcmd skill, which allows you to use the Voice Reply field with the {{result}} placeholder that you fill using the SendResult.bat script.
So if you have a long running script and you want Alexa to say something about the result, you could write your result message to a file somewhere, then trigger the Alexa routine by running a tcmd command that runs the routine by tiggering the TRIGGERcmd command you've tied to the Alexa routine. The routine would run another TRIGGERcmd command that uses the SendResult.bat script to say your message via the {{result}} placeholder in the Voice Reply field.
It's complicated because it uses all these ingredients:
TRIGGERcmd Alexa skill (the old original skill) to run a command and hear the result. An Alexa Routine with a custom action has Alexa say "Alexa, ask TRIGGERcmd to run result" to itself. TRIGGERcmd Smart Home Alexa skill to run the Alexa routine when you trigger a command. The tcmd command to run the command that triggers the Alexa Routine.I had another case where I couldn't use TRIGGERcmd because the purpose was to have my Echo next to my bed tell me if the TRIGGERcmd site is down. I used https://voicemonkey.io with IFTTT for that. It worked great. I have montastic.com call this endpoint which tells Alexa to have my Echo Dot speak "Trigger CMD is down"
https://maker.ifttt.com/trigger/Montastic/with/key/(my IFTTT key)?value1=Trigger%20CMD%20is%20down
My IFTTT applet looks like this:
8d3a1085-a78f-471c-a202-6718a9d827fe-image.png