WScript 未定义
我正在尝试在本地运行 Javascript 文件,该文件应该使用 ImageMagick 创建 CSS 图像精灵。它是 OpenID 选择器 JS 组件的一部分:http://code.google.com/p/openid -selector/
generate-sprite.js (http://code.google.com/p/openid-selector/source/browse/trunk/generate-sprite.js?r=140) 文件应该自动创建图像精灵。然而,每当我在 IE 中运行它(当然是文件的本地版本)时,我都会收到错误 SCRIPT5009: 'WScript' is undefined on line 19, character 1。
我当然已经安装了 ImageMagick 并更新了js 文件。 IE9 让 ActiveX 执行。
由于我不熟悉 WScript,所以我完全迷失了。谷歌搜索没有帮助,因为这似乎是一个非常普遍的错误。
有人可以帮忙诊断这个错误吗?
I am trying to run a Javascript file locally, which is supposed to create a CSS image sprite using ImageMagick. It's part of the OpenID selector JS component: http://code.google.com/p/openid-selector/
The generate-sprite.js (http://code.google.com/p/openid-selector/source/browse/trunk/generate-sprite.js?r=140) file is supposed to create the image sprite automatically. However, whenever I run it in IE (the local version of the file, of course), I get the error SCRIPT5009: 'WScript' is undefined on line 19, character 1.
I have of course installed ImageMagick and updated the location in the js file. IE9 is letting the ActiveX execute.
Since I'm not familiar with WScript, I am completely lost. Googling didn't help, since this seems to be a very generic error.
Can somebody help diagnose this error please?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当你说你在本地“运行”JavaScript 文件时,你使用的是 Windows 吗?如果是这样,并且从命令行双击或键入文件名不起作用,请尝试:
...显式调用
wscript.exe
。如果您不使用 Windows,则无法使用该脚本 — 它依赖于 Windows 和 Microsoft 的 JScript(
wscript.exe
程序调用该脚本)。When you say you're "running" the JavaScript file locally, are you using Windows? If so, and double-clicking or typing the filename from the command line doesn't work, try:
...which explicitly invokes
wscript.exe
.If you're not using Windows, you can't use that script — it relies on both Windows and Microsoft's JScript (which the
wscript.exe
program invokes).