iHonda Posted July 15, 2006 Posted July 15, 2006 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 expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.1.1.0 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 FileDelete($tempFile) EndFunc #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) GuiSetState() While 1 $msg = GuiGetMsg() Select Case $msg = $Button_2 $read = GUICtrlRead(3) _Talk($read) Case $msg = $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSelect WEnd Exit #endregion --- GuiBuilder generated code End --- A great place to start Autoit 1-2-3
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now