Jump to content
Sign in to follow this  

my additions to El-Trucha _talk function

Recommended Posts

all i did was add a gui that way if u only want your computer to say a quick 1 liner you only have to type what u want into an input box and click a button its kinda junk for everything but just messin around

#cs ----------------------------------------------------------------------------

 AutoIt Version:
 Author:         Zmaster's application of El-Trucha's _talk function


#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

Func _Talk($sText)
    $tempFile = @TempDir & '\talktemp.vbs'   ; Set the temp file
    FileWriteLine($tempFile, 'Dim Talk' & @CRLF & _
    'Set Talk = WScript.CreateObject("SAPI.SpVoice")' & _
    @CRLF & 'Talk.Speak "' & $sText & '"'); Add contents to the temp file
    RunWait('Wscript.exe talktemp.vbs', @TempDir); Run the VBScript

#region --- GuiBuilder code Start ---
; Script generated by AutoBuilder 0.6 Prototype

#include <GuiConstants.au3>

GuiCreate("Text To Speach", 392, 316,-1, -1 , BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS))

$Input_1 = GuiCtrlCreateInput("what you want to say here", 30, 20, 260, 120)
$Button_2 = GuiCtrlCreateButton("talk", 50, 190, 220, 110)

While 1
    $msg = GuiGetMsg()
    Case $msg = $Button_2
        $read = GUICtrlRead(3)
    Case $msg = $GUI_EVENT_CLOSE
    Case Else
#endregion --- GuiBuilder generated code End ---

A great place to start Autoit 1-2-3

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...