在javascript中运行带有输入的exe文件

时间:2014-05-31 00:52:44

标签: javascript exe answer-set-programming

我有一个我想在网页上运行的答案集编程解算器/地图集并返回结果。如果我在本地计算机上执行此操作,我将在命令提示符中运行类似的操作:

gringo queens.lp --const n=4 | clasp 2

clingo muppets.lp

其中lp文件是输入,其余是参数。如何使用exe程序clingo / gringo / clasp在输入文件上运行它们,或者从网页上的textarea输入,并显示结果,例如:有警报()? 我试着阅读另一篇文章:

<body>
<script type="text/javascript">
   var oShell = new ActiveXObject("Shell.Application");
   var commandtoRun = "C:\\Users\\mdinar\\Documents\\NLU\\clingo.exe muppets.lp"; 
   oShell.ShellExecute(commandtoRun,"","","open","1");
   //document.alert(); //what do I pass on from the exe output to the alert box?
</script>
</body>

0 个答案:

没有答案
相关问题