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

VBScript Quick Question

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 3
Thread images: 1

File: buzz.jpg (7KB, 225x225px) Image search: [Google]
buzz.jpg
7KB, 225x225px
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 posts: 3
Thread images: 1


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

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
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.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.