Advertisement
toan9xpro2012

English Speak

Aug 26th, 2014
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.84 KB | None | 0 0
  1. #include <ButtonConstants.au3>
  2. #include <EditConstants.au3>
  3. #include <GUIConstantsEx.au3>
  4. #include <WindowsConstants.au3>
  5. #include <Misc.au3>
  6.  
  7. $F = GUICreate("Say English", 460, 194, 192, 124)
  8. $I = GUICtrlCreateEdit("", 0, 0, 457, 170)
  9. $A = GUICtrlCreateButton("About", 0, 168, 153, 25)
  10. $S = GUICtrlCreateButton("Speak", 153, 168, 153, 25)
  11. $E = GUICtrlCreateButton("Exit", 305, 168, 153, 25)
  12. GUISetState(@SW_SHOW)
  13.  
  14. Func S($s)
  15.   $1 = ObjCreate("SAPI.SpVoice")
  16.   $1.Speak($s)
  17. EndFunc
  18.  
  19. While 1
  20.     $nMsg = GUIGetMsg()
  21.     If _IsPressed("11", DllOpen("user32.dll")) and _IsPressed("0D", DllOpen("user32.dll")) Then
  22.         $nMsg = $S
  23.         Send("{BS}")
  24.     EndIf
  25.     Switch $nMsg
  26.         Case $GUI_EVENT_CLOSE
  27.             Exit
  28.          Case $E
  29.             Exit
  30.         Case $S
  31.             S(GUICtrlRead($I))
  32.          Case $A
  33.             MsgBox(0,"","Hotkey: Ctrl + Enter:  Ä‘ọc");
  34.     EndSwitch
  35. WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement