如何从 Microsoft 脚本编辑器中运行 .vbs 文件?

发布于 2024-07-13 09:18:56 字数 303 浏览 6 评论 0原文

是否可以打开 Microsoft 脚本编辑器,然后从编辑器中打开 .vbs (VBScript) 文件,然后运行/调试它?

我知道我可以使用命令行 cscript (filename) //X 启动文件,从而允许我选择 Microsoft 脚本编辑器作为调试器,但我想在 Microsoft 脚本编辑器中执行所有操作。

我知道许多免费软件和商业编辑器或多或少会以或多或少的集成方式完成我想要的事情,但这个问题专门针对 Microsoft 脚本编辑器。

Microsoft 脚本编辑器作为独立应用程序仅适用于编辑/调试网页中的脚本吗?

Is it possible to open Microsoft Script Editor, then from within the editor open a .vbs (VBScript) file, then run/debug it?

I know I can use the command-line cscript (filename) //X to launch the file, allowing me to select Microsoft Script Editor as the debugger, but I want to do everything from within Microsoft Script Editor.

I am aware of a number of freeware and commercial editors that more or less will do what I want in a more or less integrated fashion, but this question is about Microsoft Script Editor specifically.

Is Microsoft Script Editor as a stand-alone application only useful for editing/debugging scripts that are part of a web page?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦里的微风 2024-07-20 09:18:56

您的脚本必须是网页的一部分。 如果 MS 脚本编辑器名副其实就好了,但事实并非如此。 您可以制作一个简单的 HTML 页面来包含您的 vbs 文件,并在脚本编辑器中使用该文件来启动您的脚本。 该页面可以像这样简单:

<script language="vbscript" src="file:///C:\myscript.vbs">
</script>

Your script has to be part of a web page. It would be nice if the MS Script Editor lived up to its name but it doesn't. You can make a simple HTML page to include your vbs file and use that in the Script Editor to launch your script. The page can be as simple as this:

<script language="vbscript" src="file:///C:\myscript.vbs">
</script>
眸中客 2024-07-20 09:18:56

您可以直接从“wiev/打开方式”菜单运行它。 从列表中选择“wscript”,然后按“打开”按钮。

您可以编辑和调试没有 html 文件的独立脚本,但无法创建它。 如果选择“文件/新建”菜单,则只能创建 html 和文本文件。 选择文本文件,并以“.vbs”扩展名保存。 关闭并重新打开它(如果设置其他默认值,请使用“打开方式 - HTML/XML 编辑器”),现在可以使用智能感知。

You can run it directly from the "wiev/Open with" menu. Choose the "wscript" from the list and press the "open" button.

You can edit and debug stand-alone scripts without html files, but can't create it. If you choose "file/new" menu, you can create only html and text file. Choose the text file, and save it with ".vbs" extension. Close and reopen it (use the "open with - HTML/XML editor" if you set other default) and now work the intellisense.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文