Foro de elhacker.net

Programación => Scripting => Mensaje iniciado por: BigBear en 10 Febrero 2012, 19:02 pm



Título: [Ruby] Funcion speak()
Publicado por: BigBear en 10 Febrero 2012, 19:02 pm
Una simple funcion para hacer hablar a la computadora , no se emocionen solo habla en ingles , cabe destacar que este funcion no anda en Window Seven , pero si en Vista y XP.

Código
  1. #!usr/bin/ruby
  2. #Funcion speak()
  3. #Coded by Doddy H
  4.  
  5. require "win32ole"
  6.  
  7. def speak(text)
  8.  test = WIN32OLE.new("SAPI.Spvoice")
  9.  test.Speak(text)
  10. end
  11.  
  12. speak("Hi stupid ,i like fuck your mother")
  13.  
  14. #The End ?
  15.