Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
THAT BATCH GUY
- Posts: 1
- Joined: 12 Dec 2015 10:50
#1
Post
by THAT BATCH GUY » 12 Dec 2015 11:00
i usually dont need help
but this code line wont work
...help
the codez:
Code: Select all
@echo off
:start
echo set speech = Wscript.CreateObject("SAPI.spVoice") >> "temp.vbs"
echo hello what should i say?
set /p talk =
set text=%talk%
echo speech.speak "%text%" >> "temp.vbs"
start temp.vbs
ping localhost -n 10 >nul
del temp.vbs
exit
-
npocmaka_
- Posts: 516
- Joined: 24 Jun 2013 17:10
- Location: Bulgaria
-
Contact:
#3
Post
by npocmaka_ » 12 Dec 2015 15:38
shorter:
Code: Select all
@echo off
set /p "to_say=enter a text :"
mshta "javascript:code(close((V=(v=new ActiveXObject('SAPI.SpVoice')).GetVoices()).count&&v.Speak('%to_say%')))"
-
Aacini
- Expert
- Posts: 1914
- Joined: 06 Dec 2011 22:15
- Location: México City, México
-
Contact:
#4
Post
by Aacini » 12 Dec 2015 16:00
Simpler?
Code: Select all
@set @a=0 /* & set /P "talk=Enter a text: "
@CScript //nologo //E:JScript "%~F0" "%talk%" & goto :EOF */
WScript.CreateObject("SAPI.SpVoice").Speak(WScript.Arguments(0))
Antonio