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.
The
Chromium Embeddedwebkit Speech Input support is disabled at this time due tothis issue. You can verify the Speech Input support by navigating to this site:http://blogs.sitepointstatic.com/examples/tech/speech-input/index.htmlI got the folowing result with
this versionof Chromium (the most recent at this time):