Solved Say.exe to run Minimized

May 17, 2013 at 13:57:11
Specs: Windows Vista or later, na
SayStatic.exe is just almost perfect, but I need it to run Minimized. Can anyone compiled the code with that option? Say.exe was provided in a Jan 2012 forum. Many references can be found including coding. <removed>@yahoo.com

edited by moderator: Removed email address -Razor2.3


See More: Say.exe to run Minimized

Report •


#1
May 17, 2013 at 18:35:55
✔ Best Answer
I didn't find the source code to modify, so here's one that might work for you, but it's home-made:

Attribute VB_Name = "sp"
Public xx As Object
Sub main()
c = Command
q$ = Chr(34)
On Error GoTo winme
Set xx = CreateObject("SAPI.SpVoice")
GoTo winxp
winme:
Resume 9
9 Set xx = CreateObject("TextToSpeech.TextToSpeech.1")
winxp:
On Error GoTo 0
'enable following to test the tts output
'c = q$ + "testing, one, two, three" + q$
'enable the following to test file coupling
'c = "words"
If c = "/?" Or c = "?" Or c = "-?" Then
Shell "cmd /c more say.hlp & pause", 3
End
End If
If LTrim(RTrim(c)) = "" Then End
'following sets the "voice" via the environment-variable "tts_voice" value
ttsvoc = Environ("tts_voice")
If ttsvoc = "" Then ttsvoc = 0
Set voices = xx.getvoices
Set xx.voice = voices(ttsvoc)
c = c + " "
p = InStr(c, " ")
p3 = 0: words = ""
p2 = InStr(c, Chr(34))
If p2 > 0 Then
p3 = InStr(p2 + 1, c, Chr(34))
If p3 > 0 Then words = Mid(c, p2, p3 - p2)
End If
If words <> "" Then
xx.speak words
Else
On Error GoTo 10
Open c For Input As #1
Do While Not EOF(1)
Line Input #1, words
xx.speak words
Loop
End If
10 End
End Sub


if there is a pair of double-quotes, then the input is interpreted as a literal, otherwise as a filename (including spaces). This could also be vbscripted if you don't have vb.


Report •

#2
May 17, 2013 at 20:04:42
Thanks so much for the great work. I do not have the software to compile your code. Would it be possible for you to compile and publish or send me the exe.
<removed>@yahoo.com
Thanks

edited by moderator: Removed email address -Razor2.3


Report •

#3
May 22, 2013 at 09:00:35
You are best to send your email address as a Private Message. Putting it in open text on a forum means the spammers engines will find it and you will get junk email forever. Best to edit it out.

Always pop back and let us know the outcome - thanks


Report •

Related Solutions

#4
May 22, 2013 at 13:45:38
Thanks... I appreciate your fixing that for me.

Report •

Ask Question