1

I am writing a script in VBS for when I log in I am greeted with the time. However, the XML variable for voice pitch is not functioning without text that is static. Am I missing something?

Sapi.speak "<PITCH MIDDLE = '5'/>Good Morning"

This runs at a higher pitch...

Sapi.speak minute(time)

While this is normal.

I have tried "<PITCH MIDDLE = '5'/> minute(time)", <PITCH MIDDLE = '5'/>middle(time), and "<PITCH MIDDLE = '5'/>"middle(time). All of which return with errors.

I appreciate any help that is given. :)

1 Answer 1

1
+50

What you pass to the Speak method is a string. You are trying to pass a string and a number, so, all you should need to do is to concatenate both using the & concatenate operator to obtain a string with the full content

Sapi.speak "<PITCH MIDDLE = '5'/>" & Minute(Time)
1
  • I appreciate this answer! Been 1 month since I asked and it finally works! Thank you so much! Commented Sep 3, 2018 at 5:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.