Hi,
I am hoping someone knows how to finish this javascript. The script copies selected text to the windows clipboard from, for instance, a webpage. This text is a phone number. It then executes the windows phone dialer program. The cursor flashes in the dialer's input area. I need some more script that can focus on that area or cursor position and paste the phone number there. Right now a CTRL-V works, but I want it automated in script. It would be nice to then automatically press the DIAL NUMBER button and close the program after 5 seconds. Can I have it all?? Does the script have to "wait" for the program to load before pasting to it?
[CODE=javascript]<script language="javas cript"type="tex t/javascript">
{
// GET SELECTED TEXT
var SelectedText = window.external .menuArguments. document.select ion.c reateRange().te xt;
// COPY IT TO CLIPBOARD
window.clipboar dData.setData(" Text",SelectedT ext);
}
var wsh = new ActiveXObject(' WScript.Shell') ;
wsh.Run("C:\\WI NDOWS\\DIALER.e xe")
</SCRIPT>[/CODE]
I am hoping someone knows how to finish this javascript. The script copies selected text to the windows clipboard from, for instance, a webpage. This text is a phone number. It then executes the windows phone dialer program. The cursor flashes in the dialer's input area. I need some more script that can focus on that area or cursor position and paste the phone number there. Right now a CTRL-V works, but I want it automated in script. It would be nice to then automatically press the DIAL NUMBER button and close the program after 5 seconds. Can I have it all?? Does the script have to "wait" for the program to load before pasting to it?
[CODE=javascript]<script language="javas cript"type="tex t/javascript">
{
// GET SELECTED TEXT
var SelectedText = window.external .menuArguments. document.select ion.c reateRange().te xt;
// COPY IT TO CLIPBOARD
window.clipboar dData.setData(" Text",SelectedT ext);
}
var wsh = new ActiveXObject(' WScript.Shell') ;
wsh.Run("C:\\WI NDOWS\\DIALER.e xe")
</SCRIPT>[/CODE]
Comment