Skip to content

Instantly share code, notes, and snippets.

@pastareal
pastareal / computervoice.vbs
Created August 29, 2024 13:25
Microsoft Speech API 4.0 using VBS
Dim userinput
userinput = inputbox("Type something to make your computer speak")
set sapi = wscript.createobject("SAPI.Spvoice")
Sapi.speak userinput
@pastareal
pastareal / ip.vbs
Created August 29, 2024 13:22
get IP address and computer name of host using VBS
dim NIC1, Nic, StrIP, CompName
Set NIC1 = GetObject("winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration")
For Each Nic in NIC1
if Nic.IPEnabled then
StrIP = Nic.IPAddress(0)
Set WshNetwork = WScript.CreateObject("WScript.Network")