Anyways, this method uses the windows SAPI in order to read textfiles that are opened via a VBscript which opens the text file chosen, reads its contents and assigns a variable for them as this variable is then read(the contents are read) by the windows SAPI that will be called to read the variable
Follow up with this instructable to see a step by tutorial to make this cool and simple text reader!
Remark: after checking out this instructable please leave a comment about what you think about it and provide a rating, I will be more than happy to hear your comments! Thanks very much hope you like it and find it useful
Remove these ads by
Signing UpStep 1: Write up the script...
'Script written by Ayman Farhat (SCRIPTmaster)
'This script allows your PC to read contents of any text file you choose!
Const ForReading = 1
strText = InputBox("Please type in the name of the file you want to read the file, the file has an extension .txt","Read text files from notepad")
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objText = objFSO.OpenTextFile(strText + ".txt", ForReading)
strText = objText.ReadAll
objText.Close
Set Sapi = Wscript.CreateObject("SAPI.SpVoice")
Sapi.speak strText
When you put the script save your work, when you save write the name of your script followed by.vbs extention as shown in the figure below






















Not Nice

























Visit Our Store »
Go Pro Today »



