html code that executes wsh code through javascript -



html code that executes wsh code through javascript -

i'm stuck on code...i'm trying html page to, when click link, phone call bms function, should open net explorer, go google, , fill search textbox word "test". isn't website or word want use, needed alter since actual website/words sensitive information. want utilize through ie since our processes go through browswer, specific using -nomerge function. code below. help!

<html> <head> <script> var wshshell = new activexobject("wscript.shell"); function bms() { wshshell.run("iexplore.exe -nomerge http://google.com"); wscript.sleep (5000); wshshell.sendkeys ("test"); wscript.quit(); } </script> </head> <a href="#" onclick="javascript:bms();">bms</a> <br /><br /> <a href="#" onclick="javascript:day();">day</a> </html>​

dont thrown off jade; it's quicker. note i'm placing scripts before closing body tag.

html head title foo body // body tag added p notice i've not declared script yet. preference/good practice. a#bsdtrigger(href='#') foo a#ssddtrigger(href='#') bar //- scripte here the important-ish part: here's pen (function() { // variable not pollute global ns var wshshell = {}; //ignore or because there no active thing wshshell.log = function() { // false behavior testing console.log(arguments); } var bsd = function bsd() { wshshell.log("foo"); window.alert('foo!'); homecoming false; } document.getelementbyid("bsdtrigger").addeventlistener('click', bsd); })();

i hope helps... it's generic , contrived, you'd employ exact same methods in doing you're trying do.

javascript html wsh

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -