Eternal_Dusk
Eternal_Dusk

Reputation: 183

Narrator Pitch on Variables in VBS

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. :)

Upvotes: 1

Views: 287

Answers (1)

MC ND
MC ND

Reputation: 70923

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)

Upvotes: 1

Related Questions