4

I have a Delphi 6 app that embeds the Chromium web browser. I want to click the Chrome microphone button (speech input control) from Javascript. I tried the usual method of calling the button's click() handler, but nothing happened. Below is the HTML I tried with the first input element being the Chrome speech input control and the second input element being a checkbox that when checked, finds the speech input control and calls its click() handler:

<input name="speechInput1" id="speechInput1" size=64 type="text" x-webkit-speech />
<input type="checkbox" onClick="document.getElementById('speechInput1').click();">Check the box to simulate a button click

Is there a way to click the speech input controls microphone button from Javascript? I found another post on Stack Overflow similar to my question but there were no solutions:

Automate speech input recording in Chrome

If not, is there a way to determine from my Delphi 6 app the location of the button in Windows screen coordinates so I can move the mouse over it and click it?

I know about AutoIt from this Stack Overflow post:

Send click to google's chrome input html tag

But I want to handle the mouse click myself instead of asking my users to download and set up AutoIt.

I also want to ask if anybody knows if it is possible to call the services made available to Chrome extensions via Javascript. If that were possible, I could call the startSpeechInput() method the speech input control exposes to extensions.

4

1 回答 1

3

由于. Chromium Embedded_ this issue您可以通过导航到此站点来验证语音输入支持:

http://blogs.sitepointstatic.com/examples/tech/speech-input/index.html

我得到了this versionChromium 的以下结果(此时最新的):

在此处输入图像描述

于 2012-05-19T14:41:31.193 回答