SendKeys/TextToSpeech leikkikalu joka toimii myös Windows 11 versiossa...
Set Ws = CreateObject("WScript.Shell")
Ws.run "Notepad.exe"
WScript.Sleep 1000
Ws.AppActivate "Notepad"
Msg = "HELLO PUTKA WORLD!" & vbCrLf
For i = 1 To Len(Msg)
WScript.Sleep 100
Ws.SendKeys Mid(Msg, i, 1)
WScript.Sleep 100
Next
Call SpeakVoice(Msg)
Set Ws = Nothing
Function SpeakVoice(msg)
Dim voice, token, voices
Set voice = CreateObject("SAPI.SpVoice")
Set voices = voice.GetVoices
' Select the desired voice by name
For Each token In voices
If InStr(token.GetDescription, "Microsoft Dave") > 0 Then
Set voice.Voice = token
Exit For
End If
Next
voice.Speak msg
Set voice = Nothing
End FunctionCopy/Paskanna koodi muistioon > valitse tallenna nimellä > kaikki tiedostot > anna joku nimi ja iske tiedostopäätteeksi .vbs > tuplaklikkaa kuvaketta...😏
Aihe on jo aika vanha, joten et voi enää vastata siihen.