I have some programming knowledge, I can write console applications in Python, Java, and I can do both console and GUI programs with VB.net. Since I know VB.net, I though I should learn VBScript. I read online that it is a language used on Internet Explorer, but the tech department at my school writes applications in a text editor and saves them as a .vbs and runs them on the computer(no browser needed). I have used this method to make a simple Message Box(MsgBox"message here",4,"title here"). Is this a single language able to be used in both environments, or are these two separate things?
-
3http://en.wikipedia.org/wiki/VBScript – Jason Sep 14 '12 at 23:47
1 Answers
I read online that it is a language used on Internet Explorer...
Yes, VBScript can be used as an alternative to JavaScript. But, in practice, nobody uses VBScript for web application development because it works only in Internet Explorer.
...but the tech department at my school writes applications in a text editor and saves them as a .vbs and runs them on the computer(no browser needed).
Yes, and many problems can be solved with VBScript. VBScript is a complete programming language and it can access the COM subsystem in Windows. What I like about VBScript is that it is available on all Windows systems. So, it is wonderful solution when you have restrictions that prohibit you from installing other language interpreters/runtimes such as the Java JRE, Python, Perl, Ruby, etc.
For an example of what you can do with VBScript, see this example which demonstrates reading a key from the Windows Registry.
And check out my post here for a pointer to downloading Microsoft's authoritative VBScript reference as a Windows help file.
All that said, Microsoft has pretty much stopped enhancing VBScript and is putting its energy into PowerShell. PowerShell is very much aimed at System Adminstrators and it is an exceptionally capable language when used for that purpose. However, the last time I looked, PowerShell was weak with respect to creating your own classes. (Or at least it was awkward.) As an application developer, though, when I am solving a problem with VBScript, I typically make use of classes via the Class
keyword extensively. A lot of folks don't know this, but you can do object-oriented programming in VBScript, and I do so often.
Check out this example that shows how you can develop your own classes via the Class
keyword in VBScript.