在Windows上编写脚本或创建程序的快捷方法?

时间:2022-02-26 17:07:42

what's a good way to scripting or creating programs unders windows?

什么是在Windows下编写脚本或创建程序的好方法?

8 个解决方案

#1


How about python?

python怎么样?

#2


You will need Notepad, and to learn JScript (not Javascript... JScript), VBScript or Batch. Then you can easily create small scripts, somewhat equivalent to bash shell scripts on Linux.

您将需要记事本,并学习JScript(不是Javascript ... JScript),VBScript或Batch。然后,您可以轻松地创建小脚本,有点相当于Linux上的bash shell脚本。

For the first two, you can read the Windows Script Host documentation.

对于前两个,您可以阅读Windows Script Host文档。

#3


Windows Powershell is becoming the new Windows scripting language. Being a full .NET language, it is inevitably much more powerful that the horrible old batch scripts one used to have to write (and still retains much of the syntactic sugar of scripting/shell languages).

Windows Powershell正在成为新的Windows脚本语言。作为一个完整的.NET语言,过去必须编写的可怕的旧批处理脚本(并且仍然保留了脚本/ shell语言的大部分语法糖)不可避免地要强大得多。

#4


You can do VBScript without the need to install anything.

你可以在不需要安装任何东西的情况下做VBScript。

Open notepad and enter the following text:

打开记事本并输入以下文字:

MsgBox "Hello"

Save it as filename.vbs Double click the file you just created, congratulations - you just created and ran a VBScript.

将其另存为filename.vbs双击刚创建的文件,恭喜 - 您刚刚创建并运行了VBScript。

#5


I'd like to plug AutoIt. It's a free download and comes with it's own editor that can be quickly/easily installed anywhere. The language is very rich and comes with a large library of user defined functions. Integrated context-sensitive help with syntax display. There's even a GUI editor. A final plus is that it compiles to .exe so will run on any win2k/xp/vista/2k3/2k8/7 PC.

我想插上AutoIt。它是免费下载的,并附带自己的编辑器,可以快速/轻松地安装在任何地方。该语言非常丰富,并附带一个用户定义函数的大型库。集成的上下文相关帮助和语法显示。甚至还有一个GUI编辑器。最后一个加号是它编译为.exe所以将在任何win2k / xp / vista / 2k3 / 2k8 / 7 PC上运行。

#6


I always use Python for scripting on Windows.

我总是使用Python在Windows上编写脚本。

#7


A vague question usually gets a vague response.

模糊的问题通常会得到模糊的回答。

Download a compiler or interpreter and find a tutorial.

下载编译器或解释器并查找教程。

With more information we can better point you in the right direction

有了更多信息,我们可以更好地指出您正确的方向

#8


I would say there are three clever choices here:

我想说这里有三个聪明的选择:

Scripting: Use JSCRIPT because much of what you learn about JSCRIPT can be used in Javascript. You can either graduate to Javascript/AJAX in the browser, or Microsoft .HTA apps.

脚本:使用JSCRIPT,因为您了解JSCRIPT的大部分内容都可以在Javascript中使用。您可以在浏览器中升级到Javascript / AJAX,也可以升级到Microsoft .HTA应用程序。

Or, you could use Python because it has standard modules to do just about anything a sysadmin would do plus addons to access Windows .COM objects and WMI. You can then either graduate to Python on a UNIX platform, Jython (which is Python in the JVM) or IronPython which opens up the entire world of .NET for you.

或者,您可以使用Python,因为它具有标准模块,可以执行系统管理员可以执行的任何操作以及用于访问Windows .COM对象和WMI的插件。然后,您可以在UNIX平台上升级到Python,Jython(在JVM中是Python)或IronPython,它可以为您打开整个.NET世界。

And there is of course, the non-scripting choice which is about creating programs under Windows. If you choose this you probably have an end-game in mind that is beyond scripting, so start with SharpDevelop and IronPython. Then, as you gain confidence, start working with C# still using the same Sharpdevelop toolset. With this choice you can also graduate to UNIX applications using the MONO .NET environment although if you want to do GUI apps on UNIX you will need to use GTK# instead of Windows Forms.

当然,非脚本选择是关于在Windows下创建程序。如果你选择这个,你可能会想到一个超越脚本的最终游戏,所以从SharpDevelop和IronPython开始。然后,当您获得信心时,仍然使用相同的Sharpdevelop工具集开始使用C#。通过这种选择,您也可以使用MONO .NET环境升级到UNIX应用程序,但如果您想在UNIX上执行GUI应用程序,则需要使用GTK#而不是Windows Forms。

#1


How about python?

python怎么样?

#2


You will need Notepad, and to learn JScript (not Javascript... JScript), VBScript or Batch. Then you can easily create small scripts, somewhat equivalent to bash shell scripts on Linux.

您将需要记事本,并学习JScript(不是Javascript ... JScript),VBScript或Batch。然后,您可以轻松地创建小脚本,有点相当于Linux上的bash shell脚本。

For the first two, you can read the Windows Script Host documentation.

对于前两个,您可以阅读Windows Script Host文档。

#3


Windows Powershell is becoming the new Windows scripting language. Being a full .NET language, it is inevitably much more powerful that the horrible old batch scripts one used to have to write (and still retains much of the syntactic sugar of scripting/shell languages).

Windows Powershell正在成为新的Windows脚本语言。作为一个完整的.NET语言,过去必须编写的可怕的旧批处理脚本(并且仍然保留了脚本/ shell语言的大部分语法糖)不可避免地要强大得多。

#4


You can do VBScript without the need to install anything.

你可以在不需要安装任何东西的情况下做VBScript。

Open notepad and enter the following text:

打开记事本并输入以下文字:

MsgBox "Hello"

Save it as filename.vbs Double click the file you just created, congratulations - you just created and ran a VBScript.

将其另存为filename.vbs双击刚创建的文件,恭喜 - 您刚刚创建并运行了VBScript。

#5


I'd like to plug AutoIt. It's a free download and comes with it's own editor that can be quickly/easily installed anywhere. The language is very rich and comes with a large library of user defined functions. Integrated context-sensitive help with syntax display. There's even a GUI editor. A final plus is that it compiles to .exe so will run on any win2k/xp/vista/2k3/2k8/7 PC.

我想插上AutoIt。它是免费下载的,并附带自己的编辑器,可以快速/轻松地安装在任何地方。该语言非常丰富,并附带一个用户定义函数的大型库。集成的上下文相关帮助和语法显示。甚至还有一个GUI编辑器。最后一个加号是它编译为.exe所以将在任何win2k / xp / vista / 2k3 / 2k8 / 7 PC上运行。

#6


I always use Python for scripting on Windows.

我总是使用Python在Windows上编写脚本。

#7


A vague question usually gets a vague response.

模糊的问题通常会得到模糊的回答。

Download a compiler or interpreter and find a tutorial.

下载编译器或解释器并查找教程。

With more information we can better point you in the right direction

有了更多信息,我们可以更好地指出您正确的方向

#8


I would say there are three clever choices here:

我想说这里有三个聪明的选择:

Scripting: Use JSCRIPT because much of what you learn about JSCRIPT can be used in Javascript. You can either graduate to Javascript/AJAX in the browser, or Microsoft .HTA apps.

脚本:使用JSCRIPT,因为您了解JSCRIPT的大部分内容都可以在Javascript中使用。您可以在浏览器中升级到Javascript / AJAX,也可以升级到Microsoft .HTA应用程序。

Or, you could use Python because it has standard modules to do just about anything a sysadmin would do plus addons to access Windows .COM objects and WMI. You can then either graduate to Python on a UNIX platform, Jython (which is Python in the JVM) or IronPython which opens up the entire world of .NET for you.

或者,您可以使用Python,因为它具有标准模块,可以执行系统管理员可以执行的任何操作以及用于访问Windows .COM对象和WMI的插件。然后,您可以在UNIX平台上升级到Python,Jython(在JVM中是Python)或IronPython,它可以为您打开整个.NET世界。

And there is of course, the non-scripting choice which is about creating programs under Windows. If you choose this you probably have an end-game in mind that is beyond scripting, so start with SharpDevelop and IronPython. Then, as you gain confidence, start working with C# still using the same Sharpdevelop toolset. With this choice you can also graduate to UNIX applications using the MONO .NET environment although if you want to do GUI apps on UNIX you will need to use GTK# instead of Windows Forms.

当然,非脚本选择是关于在Windows下创建程序。如果你选择这个,你可能会想到一个超越脚本的最终游戏,所以从SharpDevelop和IronPython开始。然后,当您获得信心时,仍然使用相同的Sharpdevelop工具集开始使用C#。通过这种选择,您也可以使用MONO .NET环境升级到UNIX应用程序,但如果您想在UNIX上执行GUI应用程序,则需要使用GTK#而不是Windows Forms。