通过按钮执行外部.exe +参数.我是新手 [英] Executing an external .exe + parameters through a button. Im a newbie

查看:121
本文介绍了通过按钮执行外部.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>



这篇关于通过按钮执行外部.exe +参数.我是新手的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆