منتدى العمدة

عزيزي الزائر / عزيزتي الزائرة يرجي التكرم بتسجبل الدخول اذا كنت عضو معنا
او التسجيل ان لم تكن عضو وترغب في الانضمام الي اسرة المنتدي
سنتشرف بتسجيلك
شكرا
ادارة المنتدي
منتدى العمدة

منتدى العمدة اغانى مسرحيات افلام برامج العاب مسابقات دردشة شات صوتى كتابى شيرنج نيوكامد سى سى كام Abox


    Make you Pc talk without any software.

    شاطر

    Admin
    المـديـر العـــام
    المـديـر العـــام

    مزاجى :
    علم بلدك : مصر
    المهنة :
    الهوايــة :
    عدد المشاركات : 183
    احترام القوانين والنشاط : 34431
    السٌّمعَة : 2
    العمر : 28

    hasri Make you Pc talk without any software.

    مُساهمة من طرف Admin في الأربعاء نوفمبر 04, 2009 2:37 pm

    Make you Pc talk without any software.

    Copy this and paste in notepad:


    Code:
    الكود:
     Dim msg, sapi
    msg=InputBox("Enter your text","Talk it")
    Set sapi=CreateObject("sapi.spvoice")
    sapi.Speak msg


    Then save it as .vbs extension
    Run the file and enter whatever text you want.
    Tested on Windows 7, Vista 32bits and XP.


    How do you keep the program open though because it keeps closing after every time you press ok.


    For those you want it like a loop:

    Copy this and paste in notepad:



    Code:
    الكود:
     Dim msg, sapi
    do
    msg=InputBox("Enter your text","Talk it")
    Set sapi=CreateObject("sapi.spvoice")
    sapi.Speak msg
    loop until msg=""


    Then save it as .vbs extension
    Run the file and enter whatever text you want.

    What is does is after the enter text, it would talk then pop back up.
    Close by clicking cancel or leaving message blank.



    How to make it Read any text file you saved, once it is in the same directory.

    Step 1: Copy this and paste in notepad:



    Code:
    الكود:
     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


    Step 2: Then save it as whatever you want.vbs extension
    Step 3: Open notepad write whatever you want there and save it with the default extension which is usually .txt
    Step 4: Now make sure the text file is in the same directory as the .vbs you save.
    Step 5: Run the .vbs and enter the name of the text file, caps does not matter

    Enjoy


    _________________

      الوقت/التاريخ الآن هو الجمعة نوفمبر 24, 2017 7:18 am