AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

speak problem.

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
vlcek



Joined: 19 Feb 2007
Posts: 321
Location: Czech Republic

PostPosted: Wed May 28, 2008 4:00 pm    Post subject: speak problem. Reply with quote

Hi all.
I have this problem.
Code:

TEMPFILE = %TEMP%\TALK.vbs
IfExist, %TEMPFILE%
   FileDelete, %TEMPFILE%
FileAppend, Dim Talk`nSet Talk = WScript.CreateObject("SAPI.SpVoice")`nTalk.Speak "Hello, I'm computer voice", %TEMPFILE%
RunWait, %TEMPFILE%
FileDelete, %TEMPFILE%

The program have error in script talk.vbs.
But when I delete simbol , all is ok.
But I need write , too.
What is the problem?
Can you help?
_________________
Thanks.
Back to top
View user's profile Send private message
YMP



Joined: 23 Dec 2006
Posts: 265
Location: Russia

PostPosted: Thu May 29, 2008 2:50 pm    Post subject: Reply with quote

You must escape the comma.
Code:

TEMPFILE = %TEMP%\TALK.vbs
IfExist, %TEMPFILE%
   FileDelete, %TEMPFILE%
FileAppend, Dim Talk`nSet Talk = WScript.CreateObject("SAPI.SpVoice")`nTalk.Speak "Hello`, I'm computer voice", %TEMPFILE%
RunWait, %TEMPFILE%
FileDelete, %TEMPFILE%
Back to top
View user's profile Send private message
vlcek



Joined: 19 Feb 2007
Posts: 321
Location: Czech Republic

PostPosted: Thu May 29, 2008 3:24 pm    Post subject: Reply with quote

Thanks.
I have next problem, I want, when program speak focus.

Code:

controlgetfocus,talk,
gosub, speaktext
speaktext:
TEMPFILE = %TEMP%\TALK.vbs
IfExist, %TEMPFILE%
   FileDelete, %TEMPFILE%
FileAppend, Dim Talk`nSet Talk = WScript.CreateObject("SAPI.SpVoice")`nTalk.Speak "%talk%", %TEMPFILE%
RunWait, %TEMPFILE%
FileDelete, %TEMPFILE%


Any reactions.
Can you help?
I want, speak focused menu items, buttons, texts edit controls and in what focus is the cursor.
_________________
Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group