[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
VBScript Quick Question
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /wsr/ - Worksafe Requests

Thread replies: 3
Thread images: 1
File: buzz.jpg (7 KB, 225x225) Image search: [Google]
buzz.jpg
7 KB, 225x225
Over the summer I have been teaching myself VBScript just to pass the time. Lately I have been working on a simple TTS debug tool. The tool, when run, is supposed to create an input box to ask the user for their name while simultaneously reading out the text on screen. Then, it will display a message box telling the user what the program does, while, again, reading out the message box. If they press Exit, Cancel, or if they enter a blank into the input box, it exits. After that, it runs Defender, network troubleshooter, pings Google, etc.

Or at least I wish.

Instead, everything works fine, except that instead of playing simultaneously, the text is read and then displayed one after the other. I Googled it and looked on MSDN. It says stuff about all of the different ways to do it, using WaitUntilDone and all these other commands. What I really want to know is:

Which one do I use?
What would the code look like?
Is this the best language for me?
Is there any other errors with the code?


dim v
Set v = CreateObject("SAPI.SpVoice")

welcome = "Hello! My name is Rex. I am your complete computer debug tool."&_
" I will try to find and fix internet connections, remove malware, ads, and viruses, and I can help speed up your computer, with just one click of a button! What's your name?"
v.speak welcome
name=inputbox(welcome,"Welcome!")

If name = "" Then
WScript.quit
else
briefing = "Alright " & name & ", I will now guide you step-by-step to use free tools which come with Windows to diagnose and hopefully fix problems on your computer. "&_
"You don't have to download a thing. Is that alright?"
v.speak briefing,
confirmbox = msgbox (briefing,4,"Hello there " & name & "!")
end if

if confirmbox=7 then
WScript.quit
else
msgbox ("placeholder")
end if
Knowing my luck, it's probably an easy fix and I was just being stupid. Or I am getting into something I seriously shouldn't at my level. Any help would be greatly appreciated. Thanks.
>>
>>143714
Why would you expect two lines you wrote one after the other to happen simultaneously?
>>
Msgbox "Wait people still use VBScript" ,vbYesNo+vbInformative+4096, "Really now?"
Thread replies: 3
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.