Jump to content
Sign in to follow this  

Text to Speech (use of Clipboard)

Recommended Posts


I'm trying to write a script that reads text from the clipboard and then gets the computer to say it, here's what I have so far:

#include <Clipboard.au3>

$oldclip = ""

While 1
    Global $currentclip = _ClipBoard_GetData()
    If $currentclip = "0" Then
    ElseIf $currentclip = $oldclip Then

    $oldclip = $currentclip

Func speak()
    $voice = ObjCreate("SAPI.SpVoice")
EndFunc   ;==>speak

It works for single lines of text, but not for text including a paragraph, i.e.

"This works"

"But this


I was wondering whether there was a solution to this

Thanks in advance


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.