SetTitleMatchMode, 2 Voice := ComObjCreate("SAPI.SpVoice") send_count_a = 0 #ifWinActive, 1.3.0 CoordMode, Pixel, Relative ;»ó´ëÀû Çȼ¿ À§Ä¡ °Ë»ö CoordMode, Mouse, Relative ;»ó´ëÀû ¸¶¿ì½º À§Ä¡ / Ŭ¸¯ µî q:: sendInput $q ;ÀÏ´Ü ÆäÀÌÁö¸¦ ³Ñ±é´Ï´Ù. (Á¤»óÀÔ·Âó¸®) sleep 80 PixelSearch, FoundX, FoundY, 200, 125, 220, 990, 0xC8F0FF, 1, Fast ;³ë¶õ ¹ÙÅÁ»ö if ErrorLevel = 0 ;¾Ï±âÁßÀ̶ó¸é (³ë¶õ»öÀ̸é) ÇÔ¼ö¸¦ ½ÇÇàÇÕ´Ï´Ù. (°øÅëºÎºÐ) c2sOut := dic() if c2sOut != 1 TTS(Voice, "Speak", c2sOut) return return w:: sendInput $w ;ÀÏ´Ü ÆäÀÌÁö¸¦ ³Ñ±é´Ï´Ù. (Á¤»óÀÔ·Âó¸®) sleep 80 PixelSearch, FoundX, FoundY, 200, 125, 220, 990, 0xC8F0FF, 1, Fast ;³ë¶õ ¹ÙÅÁ»ö if ErrorLevel = 0 ;¾Ï±âÁßÀ̶ó¸é (³ë¶õ»öÀ̸é) ÇÔ¼ö¸¦ ½ÇÇàÇÕ´Ï´Ù. (°øÅëºÎºÐ) c2sOut := dic() if c2sOut != 1 TTS(Voice, "Speak", c2sOut) return return a:: sendInput $a ;ÀÏ´Ü ÆäÀÌÁö¸¦ ³Ñ±é´Ï´Ù. (Á¤»óÀÔ·Âó¸®) sleep 80 PixelSearch, FoundX, FoundY, 200, 125, 220, 990, 0xC8F0FF, 1, Fast ;³ë¶õ ¹ÙÅÁ»ö if ErrorLevel = 0 ;¾Ï±âÁßÀ̶ó¸é (³ë¶õ»öÀ̸é) ÇÔ¼ö¸¦ ½ÇÇàÇÕ´Ï´Ù. (°øÅëºÎºÐ) c2sOut := dic() if c2sOut != 1 TTS(Voice, "Speak", c2sOut) return return s:: sendInput $s ;ÀÏ´Ü ÆäÀÌÁö¸¦ ³Ñ±é´Ï´Ù. (Á¤»óÀÔ·Âó¸®) sleep 80 PixelSearch, FoundX, FoundY, 200, 125, 220, 990, 0xC8F0FF, 1, Fast ;³ë¶õ ¹ÙÅÁ»ö if ErrorLevel = 0 ;¾Ï±âÁßÀ̶ó¸é (³ë¶õ»öÀ̸é) ÇÔ¼ö¸¦ ½ÇÇàÇÕ´Ï´Ù. (°øÅëºÎºÐ) c2sOut := dic() if c2sOut != 1 TTS(Voice, "Speak", c2sOut) return dic() { c2sOut := 1 PixelSearch, FoundX, FoundY, 200, 125, 220, 990, 0xC8F0FF, 1, Fast ;³ë¶õ ¹ÙÅÁ»ö ;traytip, dic()ÀÌ ÀÛµ¿ÇÕ´Ï´Ù., haha, 30 ;tooltip, Activated sleep 80 ;Ȥ½Ã ¸ð¸¦ ¿¡·¯¿¡ ´ëºñÇÕ´Ï´Ù. Àå¸éÀÌ ¹Ù²î´Â °É ±â´Ù¸³´Ï´Ù. x1 :=FoundX y1 :=FoundY+5 x2 :=x1+20 y2 :=y1+10 clkX :=FoundX+5 clkY :=FoundY+35 PixelSearch, FoundX, FoundY, x1, y1, x2, y2, 0x000000, 1, Fast ;ºñÈ°¼º ±ÛÀÚ»ö °ËÁ¤»ö ¾Æ´Ô > Ç÷¡½ÃÄ«µå ¾Õ¸é if ErrorLevel != 0 ;±ÛÀÚ»öÀÌ È°¼º(°ËÁ¤»ö)ÀÌ ¾Æ´Ï¸é > Ç÷¡½ÃÄ«µå ¾Õ¸éÀ¸·Î ÆÇ´ÜÇÏ°í ¾Æ·¡¸¦ ½ÇÇà { ;traytip, ±ÛÀÚ»öÀÌ °ËÁ¤»öÀÌ ¾Æ´ÔÀ» È®ÀÎÇÏ¿´½À´Ï´Ù., haha MouseGetPos, OriginalX, OriginalY MouseClick, Left, clkX, clkY, 1, 0 MouseMove, OriginalX, OriginalY, 0 saveclip := Clipboard Clipboard = ;Ŭ¸³º¸µå¸¦ ºñ¿ó´Ï´Ù.ClipWait ¿¹Á¦·ÎºÎÅÍ. Sendinput ^a^c ;Àüü¼±ÅÃÇؼ­ º¹»çÇÕ´Ï´Ù. Sendinput, {tab} ClipWait, 2 if ErrorLevel { Traytip, Çä... º¹»ç ½ÇÆÐÇß¾î¿ä! ¤Ð¤Ð, Ȥ½Ã ´Ù¸¥ âÀÌ °¡¸®°í Àְųª ÇÏÁö´Â ¾Ê³ª¿ä?, 30 Clipboard := saveclip lucako:=1 return } else { c2s := clipboard Clipboard := saveclip lucako:=0 return c2s } } return } clipRet() { RetBoy := clipboard ;º¯¼ö¿¡ Ŭ¸³º¸µå ³»¿ëÀ» ÀúÀåÇÕ´Ï´Ù. ;TrayTip, ÀÐÀº °ªÀº, %RetBoy% return RetBoy ;ÀúÀåÇÑ °ªÀ» ¹ÝȯÇÕ´Ï´Ù. } ;°Ë»öÀ» ÅëÇØ ¾òÀº TTS ÇÔ¼öÀÔ´Ï´Ù. ;www.autohotkey.com/community/viewtopic.php?t=57773 TTS(oVoice, command, param1="", param2="") { ; by Learning one. For AHK_L. Thanks: jballi, Sean, Frankie. ; AHK forum location: www.autohotkey.com/forum/topic57773.html ; Read more: msdn.microsoft.com/en-us/library/ms723602(v=VS.85).aspx, www.autohotkey.com/forum/topic45471.html, www.autohotkey.com/forum/topic83162.html static CommandList := "ToggleSpeak,Speak,SpeakWait,Pause,Stop,SetRate,SetVolume,SetPitch,SetVoice,GetVoices,GetStatus,GetCount,SpeakToFile" if command not in %CommandList% { MsgBox, 16, TTS() error, "%command%" is not valid command. return } if command = ToggleSpeak ; speak or stop speaking { Status := oVoice.Status.RunningState if Status = 1 ; finished oVoice.Speak(param1,0x1) ; speak asynchronously Else if Status = 0 ; paused { oVoice.Resume oVoice.Speak("",0x1|0x2) ; stop oVoice.Speak(param1,0x1) ; speak asynchronously } Else if Status = 2 ; reading oVoice.Speak("",0x1|0x2) ; stop } Else if command = Speak ; speak asynchronously { Status := oVoice.Status.RunningState if Status = 0 ; paused oVoice.Resume oVoice.Speak("",0x1|0x2) ; stop oVoice.Speak(param1,0x1) ; speak asynchronously } Else if command = SpeakWait ; speak synchronously { Status := oVoice.Status.RunningState if Status = 0 ; paused oVoice.Resume oVoice.Speak("",0x1|0x2) ; stop oVoice.Speak(param1,0x0) ; speak synchronously } Else if command = Pause ; Pause toggle { Status := oVoice.Status.RunningState if Status = 0 ; paused oVoice.Resume else if Status = 2 ; reading oVoice.Pause } Else if command = Stop { Status := oVoice.Status.RunningState if Status = 0 ; paused oVoice.Resume oVoice.Speak("",0x1|0x2) ; stop } Else if command = SetRate oVoice.Rate := param1 ; rate (reading speed): param1 from -10 to 10. 0 is default. Else if command = SetVolume oVoice.Volume := param1 ; volume (reading loudness): param1 from 0 to 100. 100 is default Else if command = SetPitch ; http://msdn.microsoft.com/en-us/library/ms717077(v=vs.85).aspx oVoice.Speak("",0x20) ; pitch : param1 from -10 to 10. 0 is default. Else if command = SetVoice { Loop, % oVoice.GetVoices.Count { Name := oVoice.GetVoices.Item(A_Index-1).GetAttribute("Name") ; 0 based If (Name = param1) { DoesVoiceExist := 1 break } } if !DoesVoiceExist { MsgBox,64,, Voice "%param1%" does not exist. return } While !(oVoice.Status.RunningState = 1) Sleep, 20 oVoice.Voice := oVoice.GetVoices("Name=" param1).Item(0) ; set voice to param1 } Else if command = GetVoices { param1 := (param1 = "") ? "`n" : param1 ; param1 as delimiter Loop, % oVoice.GetVoices.Count { Name := oVoice.GetVoices.Item(A_Index-1).GetAttribute("Name") ; 0 based VoiceList .= Name param1 } Return RTrim(VoiceList,param1) } Else if command = GetStatus { Status := oVoice.Status.RunningState if Status = 0 ; paused Return "paused" Else if Status = 1 ; finished Return "finished" Else if Status = 2 ; reading Return "reading" } Else if command = GetCount return oVoice.GetVoices.Count Else if command = SpeakToFile ; param1 = TextToSpeak, param2 = OutputFilePath { oldAOS := oVoice.AudioOutputStream oldAAOFCONS := oVoice.AllowAudioOutputFormatChangesOnNextSet oVoice.AllowAudioOutputFormatChangesOnNextSet := 1 SpStream := ComObjCreate("SAPI.SpFileStream") FileDelete, % param2 ; OutputFilePath SpStream.Open(param2, 3) oVoice.AudioOutputStream := SpStream TTS(oVoice, "SpeakWait", param1) SpStream.Close() oVoice.AudioOutputStream := oldAOS oVoice.AllowAudioOutputFormatChangesOnNextSet := oldAAOFCONS } } TTS_CreateVoice(VoiceName="", VoiceRate="", VoiceVolume="", VoicePitch="") { ; by Learning one. For AHK_L. oVoice := ComObjCreate("SAPI.SpVoice") if !(VoiceName = "") TTS(oVoice, "SetVoice", VoiceName) if VoiceRate between -10 and 10 oVoice.Rate := VoiceRate ; rate (reading speed): from -10 to 10. 0 is default. if VoiceVolume between 0 and 100 oVoice.Volume := VoiceVolume ; volume (reading loudness): from 0 to 100. 100 is default if VoicePitch between -10 and 10 TTS(oVoice, "SetPitch", VoicePitch) ; pitch: from -10 to 10. 0 is default. return oVoice }