Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Why study WSH?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly shows you "Why to learn WSH", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn "Why to learn WSH" this article.

What I want to say is just one very important thing to be a person: pursue your own interests and give full play to your strengths, which is the same for doing everything, learning programming, learning WSH, and then look at the small one: WSH now supports VBS and JS. Grammatically, VBS is like VB,JS, like Java, and what you choose depends on your interest.

Here, just say "programming", excluding those who want to learn advanced software engineering and then manage others. If you are not interested, it is very tiring to learn programming, but it is easier to engage in management, communication, sales and so on. If you must ask, "programming" is more promising than "management"? Can only tell you: interest! At the same time, some people should be advised to pay attention to their own strengths and weaknesses. Do not insist on doing management without good management ability. How many hereditary emperors are there? He doesn't know how many of his men are better than him! If you find the direction of your ability development, then go to further study, but I see some people do not even know how to manage their own documents and emails, and find their teeth everywhere when they need it. Their ideal is to manage a group of elites. I won't work for such a man no matter how much money he pays me, unless he knows to leave me alone. I am a programmer who has the ability to manage myself and knows how to communicate and collaborate with others. Of course, I don't collaborate with garbage.

The whole world of Windows is full of COM and provides rich reusable functions. VBS itself basically has no function, so it can only call COM to expand unlimited functions, so it makes it easy to call COM. You can think of it as a language that is generated to facilitate the call of COM.

When I was in college, I wrote two articles about how to get started with programming for the freshmen of the School of Software of Xiamen University. Others wrote C and Java, and VBS. I think you can do a lot of things with a few lines of VBS code, and you can quickly understand what programming can do. C and Java, to be honest, only know that they can be used to solve math problems after writing an article, especially C, which takes a long time to exercise to know that it is invincible, and Java at most tells freshmen that it can be a website. Now that someone has been introduced to understand math problems and do a website, say something awesome!

VBS's Hello World only needs one line: MsgBox "Hello World". It doesn't need to be compiled and saved as * .VBS. Language is probably the simplest language, and it can be learned soon. Of course, that's not the point. As mentioned earlier, it's easy to call COM. What can you do when you call COM? There are too many things to say, for example, you can connect to the database and then operate it conveniently; you can control Microsoft's Office to complete some automation work; you can easily call WMI to manage the Windows system. Basically, WMI can do whatever the mouse and keyboard can do. As long as there is a standard installation of Windows (not available in Windows 95 / 97, starting with and after 98), the features that allow us to write some Mini Program at any time to facilitate our other work, just like some people like to use bat/cmd scripts, in fact, bat/cmd can do, VBS can do.

If you have seen the script works in the network disk, you will know that those programs are files with the suffix .VBE. This is actually the encrypted file of the VBS program. After decryption, you can see the code. These scripts are quite practical, and some of the script works are described in detail in my presentation (you can find Script in my space). I like to use VBS to write these tools, because it is convenient, a small amount of code can complete more functions, the same function to write in C to write more than 2 / 3 times the code.

Personally, I think that if you are a curious and sensitive person, learning WSH will also be of great help in understanding COM. For example, when you see the string parameter of CreateObject, you wonder why this string can represent an object. Then to find the answer, it turns out that there is a registration in the registry, so dig out the concept of COM such as ProgID and CLSID. Later, I knew how to call COM components very well, so I began to feel uncomfortable and kept calling, so it was time to write a component for fun, so I could expand the functions I wanted at will, and then I began to learn how to write COM: I heard that VB writing COM is almost as easy as calling COM. Once used, it is really the same as using VB to do ordinary programs! But later found that still do not understand the internal implementation of COM, use VC to write it, immediately Microsoft Legion told you that you should use ATL, then take a look, found that the internal implementation of ATL is also hidden, then look at the ATL code, rely on, the master basically stereotyped! Then directly use pure C to achieve COM, indeed the world is invincible!

There are only reasons to learn WSH: interest, curiosity, and easy to write gadgets.

The above is all the contents of the article "Why are you learning WSH"? thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report