Skip to main content

Posts

Showing posts with the label VBScript

How to Make Your Computer Speak Any Text You Type

Short answer: Windows can read any text aloud, and you can build your own "talking" tool in seconds with a tiny VBScript that pops up a box, takes whatever you type, and speaks it. For everyday reading, Windows also has built-in text-to-speech (Narrator and Read Aloud). Here is the fun DIY version plus the practical built-in options. Build a "type and speak" tool Open Notepad and paste this: Dim msg, speak msg = InputBox("Type something for me to say:", "Talking Computer") Set speak = CreateObject("SAPI.SpVoice") speak.Speak msg Save it as talk.vbs (select "All Files" as the type). Double-click it, type any text, and your PC says it out loud. It uses the speech engine already built into Windows, nothing to install. Practical built-in text-to-speech Feature Use it for Narrator (Win + Ctrl + Enter) Full screen reader Read Aloud (in Edge/Word) Have articles/documents read to you Voice settings Change voic...

How to Make Your Computer Greet You by Name at Startup

Short answer: you can make Windows greet you out loud by name at startup with a tiny built-in scripting trick, no software to install. Save a short VBScript that speaks a welcome message, then set it to run at login. Here is the exact code, how to make it say good morning/afternoon/evening, and how to run it safely. Create the welcome script Open Notepad and paste this: Dim speak Set speak = CreateObject("SAPI.SpVoice") speak.Speak "Welcome back. Have a great day!" Save it as welcome.vbs (choose "All Files" as the type so it is not saved as .txt). Double-click it, your PC speaks the message aloud. Make it greet you by time of day Use this version to say good morning, afternoon, or evening automatically: Dim speak, h, msg h = Hour(Now) If h < 12 Then msg = "Good morning! Ready to get started?" ElseIf h < 18 Then msg = "Good afternoon! Welcome back." Else msg = "Good evening! Let's get to work....

How to Make a Harmless Funny 'Virus' Prank in Notepad (CD Eject)

Short answer: you can make a harmless joke script in Notepad that keeps popping open the CD/DVD drive, great for a laugh on a friend's PC that has an optical drive. It is a few lines of VBScript, changes nothing, and stops the moment you close it. Here is the code, how it works, how to stop it, and the safety line you must not cross. A note before you prank anyone This is only funny on a computer you have permission to use, and only harmless because it changes nothing. Do not run scripts on someone's work machine or anywhere it could cause real trouble. A prank that annoys a friend for ten seconds is fine; one that disrupts someone's work is not. The CD-eject prank code Open Notepad . Paste this: Set oWMP = CreateObject("WMPlayer.OCX.7") Set colCDROMs = oWMP.cdromCollection do if colCDROMs.Count >= 1 then For i = 0 to colCDROMs.Count - 1 colCDROMs.Item(i).Eject Next End If wscript.sleep 5000 loop Save it as prank.vbs (choose ...

Cool Windows Keyboard Tricks: Make Your LEDs Dance (and More Fun Scripts)

Short answer: you can make your keyboard's Caps Lock, Num Lock and Scroll Lock LEDs flash like a mini disco using a tiny Windows VBScript, no software needed. It is a classic, harmless trick I still enjoy showing people. Here is the script, how it works, how to stop it, and a few other fun tricks, plus the safety notes that matter. The disco LED trick Open Notepad . Paste this exactly: Set wshShell = wscript.CreateObject("WScript.Shell") do wscript.sleep 100 wshshell.sendkeys "{CAPSLOCK}" wshshell.sendkeys "{NUMLOCK}" wshshell.sendkeys "{SCROLLLOCK}" loop Save it as Disco.vbs (choose "All files" as the type so it does not save as .txt). Double-click the file. Your keyboard LEDs will flash in rhythm. How it works The script creates a Windows Shell object and, in an endless loop, sends the Caps/Num/Scroll Lock key presses every 100 milliseconds. Each press toggles that lock's LED, so they blink rapidly. The wscrip...