开发者

How can I send the key ENTER to the page setup dialog in IE7

I have the following code that changes the page orientation. it works in IE6 but not in IE7. it gets as far as %a and does not send the enter or tab keys so that i can hit 'OK'

var shell;
function SetPrintProperties() {

shell = new ActiveXObject("WScript.Shell");
shell.SendKeys("%fu"); // %=alt  f= file u= page setup
window.setTimeout("javascript:SetPaperSize();", 1500);

}

function SetPaperSize() {

shell.sendKeys("%a{ENTE开发者_StackOverflowR}");

}


Try to run this

shell.SendKeys("%~");

From here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜