通过按钮执行外部.exe +参数.我是新手

问题描述:

你好,

我是一个初学者,并且只具有html,css和xml的基本知识.
我正在尝试制作一个显示Gametracker中iframe横幅的小工具,所以我可以观看游戏服务器.

可以正常工作,但是我想创建一个按钮,让我可以启动游戏并自动加入服务器.

常规命令行将是:
"C:\ Program Files \ EA GAMES \ MOHAA \ MOHAA.exe" + connect 199.103.180.11:12206

我先没有参数就尝试了,但无法正常工作:

hello,

Im pretty much a beginner and have only basic knowledge of html, css and xml.
I am trying to make a gadget which shows an iframe banner from Gametracker, so I can watch my game server.

This works fine, but I want to make a button which lets me start the game and automaticly joins my server.

The general command line would be:
"C:\Program Files\EA GAMES\MOHAA\MOHAA.exe" +connect 199.103.180.11:12206

I tried it without the parameters first and I cant get it to work:

  <body onload="init()">
<g:background id="imgBackground">
<button type="button" name="join" accesskey="r" id="btnRemoveAll" title="join" tabindex="3" onclick="shell.run(c:\\%PROGRAMFILES%\\EA GAMES\\MOHAA\\moh_spearhead.exe"); >Join Server</button>
</g:background>
</body>

我尝试了在论坛上找到的其他几种方法,但是我无法使其正常工作.

I tried several other possibilities I found here on the forums, but I simply cant get it work.

尝试以下操作:
<body onload="init()">

    <g:background id="imgBackground">

	<button type="button"  name="join" accesskey="r" id="btnRemoveAll" title="join" tabindex="3" onclick="System.Shell.execute("%PROGRAMFILES%\\EA GAMES\\MOHAA\\moh_spearhead.exe", "connect 199.103.180.11:12206");  >Join Server</button>

	</g:background>

</body>