不知道使用哪种程序语言我不知道如何只编写一些HTML但不会工作 [英] not sure which program language to use I don't know how to code only a little HTML but that wont work

查看:94
本文介绍了不知道使用哪种程序语言我不知道如何只编写一些HTML但不会工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是坐着并有了一个主意。我想创建一个全屏程序,它将作为一个分辨率为1280 x 800的菜单,只是一个背景图像和一个下一个上一个和启动程序按钮。



所以我可以为我的VR头设备启动一些程序而不用它。窗户在立体视觉上看起来不太好,能够循环播放节目会很棒。



我将如何开始这样的项目?



我刚刚在HTML中构建了一些看起来很棒的页面,但我很快发现我无法在本地启动程序DOH!如果有人可以指出我的方向很好。



感谢您的时间



迈克尔



以为我只是展示了我想要创建的内容。点击下一步按钮加载新页面不同的背景图像不同的可执行程序。



http://www.pczombie.com.au/RiftCoaster.html

解决方案

你无法启动本地程序来自网页 - 除非页面托管在本地计算机上,并且您在后面的代码中使用代码。



最简单的方法是是创建一个WinForms .NET应用程序,它运行最大化,上面有三个按钮。开始一个非常简单:只需调用Process.Start方法,并将应用程序的名称作为参数: http://msdn.microsoft.com/en-us/library/53ezey2s.aspx [ ^ ] - 该链接包含各种语言的示例。



当你想使用Next和Previous按钮来选择要运行的应用程序时,会出现复杂问题 - 这并不难,但这意味着要创建一些表单的集合并添加应用程序名称然后选择要运行哪一个。正如我所说,这并不难,但具体取决于你的技能和选择的语言。



你有编程语言技能吗?你知道如何创建任何集合的例子吗?



你说有可能通过HTML在本地发布东西是对的吗?这就是我真的我想做它仅供个人使用。





否 - HTML完全不具备此功能(出于安全原因:如果你能做到,那么恶意网站也可以这样做。)

你可以在后面的代码中执行它 - 在ASP中运行在服务器上的C#或VB代码APSX网站(但对你想要的东西来说有点过分了) - 你现在最好使用纯粹的本地解决方案。



你有Visual Studio吗?所有(最好是包含C#的版本)?如果没有,请从此处获取Express版本: http://www.microsoft.com/ visualstudio / eng / downloads#d-express-windows-desktop [ ^ ] - 它是免费的! (和我以后使用的版本!)



当你准备好了,回复这个,我会试着引导你完成......

是的,它就像3.141592653(π,pi,pie)一样简单



你只需要了解这项技术仅限于互联网资源管理器。没有其他我知道的浏览器将允许创建ActiveX对象。



在Internet Explorer中尝试以下代码 - 您必须接受并放弃安全警告。 (我认为你可以设置IE以便在从本地站点运行时始终允许创建ActiveX对象,不知道,不记得了)





 <  !DOCTYPE     html  >  
< html >
< head >
< script >
function RunEXE()
{
var prog = cmd.exe;
var oShell = new ActiveXObject( WScript.Shell);
oShell.Run(prog);
}
< / 脚本 >
< style >
< / style >
< / head >
< 正文 >
< 按钮 onclick =' RunEXE()' > 打开命令提示符< / button >
< / body >
< span class =code-keyword>< / html >


I was just sitting and had an idea. I would like to create a full screen program that would function as a menu with a resolution of 1280 x 800 just a background image and a next previous and start program button.

so I can launch some programs for my VR head set with out taking it off. windows doesn't look good in stereoscopic and to be able to cycle through programs would be fantastic.

how would i go about start a project like this?

I just built a few pages in HTML that looked great just what I wanted but soon figure out i cannot launch programs locally DOH! If someone could point me in the right direction that would be great.

thanks for your time

Michael

thought I'd just show this exactly what I would like to create.clicking next button loading a new page different background image different executable program.

"http://www.pczombie.com.au/RiftCoaster.html

解决方案

You can't launch programs locally from a web page - not unless the page is hosted on your local machine, and you use code in the code behind.

The easiest way to do this would be to create a WinForms .NET application, that runs maximized with three buttons on it. The "Start" one is pretty easy: just call the Process.Start method with the name of the application as the parameter: http://msdn.microsoft.com/en-us/library/53ezey2s.aspx[^] - the link includes an example in various languages.

The complication comes when you want to use the "Next" and "Previous" buttons to select which app to run - it's not difficult, but it means creating a collection of some form and adding the application names to it, then selecting which one is to be run. As I say, that's not difficult to do, but exactly how depends on your skill and chosen language.

Do you have any programming language skills? Do you know how to create any examples of collections?

" You said it was possible to launch stuff locally via HTML is that right? That's all I really would like to do its just for my personal use.
"


No - HTML has no capability for that at all (for security reasons: if you could do it, so could "malicious" websites).
You can do it in the code behind - the C# or VB code that runs on the server in an ASP or APSX website (but that is a bit overkill for what you want) - you are better off with a purely local solution for the moment.

Do you have Visual Studio at all (preferably a version that includes C#)? If not, get the Express version from here: http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-desktop[^] - it's free from Microsoft! (and a later version than I use!)

When you're ready, reply to this and I'll try to guide you through...


Yep, it's as easy as 3.141592653 (π, pi, pie)

You just need to understand that the technique is limited to Internet Explorer. No other browser that I'm aware of will allow the creation of ActiveX objects.

Try the following code in Internet Explorer - you'll have to accept and waive the security warnings. (I think you can set IE to always allow the creation of ActiveX objects when run from a local site, don't know, cant remember)


<!DOCTYPE html>
<html>
<head>
<script>
function RunEXE()
{
    var prog = "cmd.exe";
    var oShell = new ActiveXObject("WScript.Shell");
    oShell.Run(prog);
}
</script>
<style>
</style>
</head>
<body>
    <button onclick='RunEXE()'>Open command prompt</button>
</body>
</html>


这篇关于不知道使用哪种程序语言我不知道如何只编写一些HTML但不会工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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