在 Windows 中自动执行任务的最佳方法
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1147907/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Best way to automate tasks in windows
提问by Gordon Gustafson
Mac has applescript 'built in' and I've found its pretty nice to work with for automating stuff.
Mac 有“内置”applescript,我发现它非常适合用于自动化工作。
What's the best windows equivalent?
什么是最好的窗户等价物?
回答by Alex Martelli
Maybe PowerShell-- but it's really much more powerful than applescript. VBA only exists within specific applications that supply it, such as Excel, not stand-alone.
也许是PowerShell—— 但它确实比 applescript 强大得多。VBA 只存在于提供它的特定应用程序中,例如 Excel,而不是独立的。
回答by Helen
VBScriptand JScriptare standard Windows Script Host languages. See Microsoft Windows Script Technologies.
VBScript和JScript是标准的 Windows Script Host 语言。请参阅Microsoft Windows 脚本技术。
回答by stib
I discovered python when I moved to a PC and was looking for something to do all the kind of stuff I'd usually do with applescript. As someone who learned most of my programming skills using applescript it came pretty easily to me. Best thing is that you can use it on any platform.
当我搬到 PC 上时,我发现了 python,并且正在寻找一些东西来做我通常用 applescript 做的所有事情。作为使用 applescript 学习我大部分编程技能的人,这对我来说很容易。最好的事情是您可以在任何平台上使用它。
BTW applescript has been around a lot longer than OSX.
顺便说一句,applescript 的存在时间比 OSX 长得多。
回答by Marc B. Hankin
Powershell is the program to learn if you want to automate stuff in windows. Microsoft is deprecating vbscript, which is part of Windows Script Host, and pushing Powershell as the modern replacement for vbscript. For example, Microsoft is creating more and more APIs for Powershell. On the other hand, vbscript bears a great similarity to vba, which is the default program for automating Word, Excel and Outlook.
Powershell 是学习是否要在 Windows 中自动化操作的程序。Microsoft 正在弃用 vbscript,它是 Windows Script Host 的一部分,并推动 Powershell 作为 vbscript 的现代替代品。例如,微软正在为 Powershell 创建越来越多的 API。另一方面,vbscript 与 vba 非常相似,vba 是自动执行 Word、Excel 和 Outlook 的默认程序。