I appreciate that this is an old thread but it pointed me in the right direction so I figured I'd share a couple of things I added:
In this particular script I turn my outside speakers on using VC and EventGhost. Once the speakers are on Bob (there's no "Jarvis" in my house..) announces that they have been turned on. The problem I had with the script as it was is that Bobs volume was set to 100% which effectively meant he yelled that the speakers were on!
and if music was playing when I gave the command to turn the speakers on it wasn't muted while Bob was talking.
So firstly I set up a Global Hot Key in MediaMonkey (Cntrl+Shift+M) to mute/unmute the sound. Then I added this to the top and bottom of the script:
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "^+{M}"
Then to stop Bob yelling I added the following which sets the TTS volume and rate. NOTE: These settings only apply to the announcements Bob makes in this script - I use other commands to tell Bob to speak up or stop yelling if I want to change the VC's TTS level:
Dim sapi,ttsmeassage
set sapi = CreateObject("sapi.spvoice")
with sapi
Set .voice = .getvoices.item(0)
.Volume = 15
.Rate = 1
end with
So the whole thing looks like this:
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "^+{M}"
Dim sapi,ttsmeassage
set sapi = CreateObject("sapi.spvoice")
with sapi
Set .voice = .getvoices.item(0)
.Volume = 15
.Rate = 1
end with
Randomize
myrand = Int((3)*Rnd+1)
if hour(now)<6 then
ttsmessage = "wow, your up early David! The outside speakers are now on"
elseif hour(now)<12 then
ttsmessage = "Good morning David, The outside speakers are now on"
elseif hour(now)<17 then
ttsmessage = "Good after noon David. The outside speakers are now on"
elseif hour(now)<22 then
ttsmessage = "Good evening David. The outside speakers are now on"
else
ttsmessage = "Good evening David, isn't it past your bed time? The outside speakers are now on"
end if
sapi.Speak ttsmessage
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys "^+{M}"
Ideally I would like to use a "softmute" option rather than having to fully mute MediaMonkey but I haven't found a way to do that. I tried using nircmd.exe but that didn't give me what I wanted either because I couldn't "unmute" to the previous volume level. Anyone got any ideas?
Cheers