Jump to content

Recommended Posts

Posted (edited)

This is really cool its going to be in my game il share it with you all.

IT MUST BE COMPLIED you cant run it in sytec or w.e

pritty simple

type

hello

will send you a message

msg=yourmessage

with send you what you types

say=hello

will say in speakers what you types

Please dont rip it like people do takeing my code and makign it better i can make it better on my own....

ITS CALLED LEARNING

#include <GUIConstants.au3>
Dim $i = 0
Dim $title = "Console"

$Form1 = GUICreate("G-V - "&$title, 622, 181, 192, 125)
$List1 = GUICtrlCreateList("", 8, 0, 609, 136, -1, $WS_EX_CLIENTEDGE)
$Input1 = GUICtrlCreateInput("", 8, 144, 529, 21, -1, $WS_EX_CLIENTEDGE)
$Button1 = GUICtrlCreateButton("Send", 544, 144, 67, 25)
GUISetState(@SW_SHOW)

While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $Button1
        $i=$i+1
        $outlog2=GUICtrlRead ($Input1)
        $outlog= $i &": "& $outlog2
        GUICtrlSetData($List1,$outlog&"|", "-")
        GUICtrlSetData($Input1, "") 
        Call("runit")  
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case Else
;;;;;;;
    EndSelect
WEnd
Exit

Func runit()
    Call($outlog2)
        If @error Then  
    $array = StringSplit($outlog2,'=')
    Call($array[1], $array[2])
;~  MsgBox(0,"Ummm",$array&$array[1]&$array[2])
    EndIf
    If @error Then
        MsgBox(0,"Error: 1001",$outlog2 & " - Invalid function")
        EndIf
EndFunc


Func hello()
MsgBox(0,"Hello","Welcome")
EndFunc

Func msg($msg)
MsgBox(0,"You said",$msg)
EndFunc

Func say($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

G_V_Console.zip

Edited by kcd-clan
Visit mEMy programs made.Iul - IulG-V Console - G-V Console_RandomLetter - _RandomLetter()Saftey Kill - Saftey Killcolorzone() = colorzone()
Posted

Compiled i get a error

Call($array[1], $array[2])

Array variable has incorrect number of subscripts or subscript dimension range exceeded.:

What's this do by the way? I really don't get it.. Only looked at it because you had no posts and i hate it when no one replies to my threads :think:

Posted

run this script i made

#NoTrayIcon
#include <GUIConstants.au3>
Dim $voice = ObjCreate("Sapi.SpVoice")
$Error = ObjEvent("AutoIt.Error", "ErrFunc")
GUICreate("Talker", 600, 280)
$text = GUICtrlCreateInput("Text to speak", 10, 10, 580, 50, $ES_MULTILINE)
$speak = GUICtrlCreateButton("Speak", 10, 65, -1, -1, $BS_DEFPUSHBUTTON)
GUICtrlCreateGroup("Options", 10, 100, 580, 170)
$rate = GUICtrlCreateSlider(20, 150, 280, 30, $TBS_TOP + $TBS_AUTOTICKS)
GUICtrlSetLimit($rate, 50, -50)
GUICtrlSetData($rate, 0)
$volume = GUICtrlCreateSlider(300, 150, 280, 30, $TBS_TOP + $TBS_AUTOTICKS)
GUICtrlSetLimit($volume, 100, 1)
GUICtrlSetData($volume, 100)
GUICtrlCreateLabel("Slow", 20, 185)
GUICtrlCreateLabel("Normal", 140, 185)
GUICtrlCreateLabel("Fast", 270, 185)
GUICtrlCreateLabel("Quiet", 310, 185)
GUICtrlCreateLabel("Loud", 550, 185)
GUICtrlCreateLabel("Voice:", 20, 233)
$voiceC = GUICtrlCreateCombo("Microsoft Sam", 60, 230, 100)
Dim $SOTokens = $voice.GetVoices('', '')
For $Token In $SOTokens
    GUICtrlSetData($voiceC, $Token.GetDescription)
Next
;~ GUICtrlSetData($voiceC, "Microsoft Mike|Microsoft Mary|LH Michael|LH Michelle")
GUISetState()

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $speak
            Speak(GUICtrlRead($text), GUICtrlRead($voiceC), GUICtrlRead($rate) / 10, GUICtrlRead($volume))
    EndSwitch
WEnd

Func Speak($text, $SapiVoice, $rate = 1, $Vol = 100)
    $voice.Rate = $rate
    If @error Then Return
    $voice.Volume = $Vol
    If @error Then Return
    Local $t_voice = $voice.GetVoices ("Name=" & $SapiVoice, "Language=409").Item (0)
    If @error Then Return
    $voice.Voice = $t_voice
    If Not @error Then $voice.Speak ($text)
EndFunc ;==>Speak

Func ErrFunc()
    MsgBox(48, "Error", "This machine doesn't have " & GUICtrlRead($voiceC) & " installed")
    SetError(1)
EndFunc ;==>ErrFunc

it uses only AutoIt functions.

My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...