Friday, 2 August 2013

Make your system read for you

If you want your system to read text files for you, 
here is a tip..

Just follow these steps..

1. Open notepad
2. Copy the code below and paste it there

Set sapi = CreateObject("sapi.spvoice")
Set fs = CreateObject("Scripting.FileSystemObject")
path = Inputbox("Enter path for the text file to read:", "?#?Expert? Hackers")
If Not (fs.FileExists(path)) Then
X = Msgbox("The specified file does not exist!", 48, "ERROR!")
Else
Set a = fs.OpenTextFile(path)
text = a.ReadAll
sapi.Speak(text)
a.Close
End If

3. now save this with any name but with .vbs extension
4. Now run this .vbs file
5. It will prompt for a path so give the exact path of your text file completely i.e with .txt extension
6. Now you windows will start reading the file for you
7. To stop this, end the wscript process from your task manager

No comments:

Post a Comment