The Basics of Windows Scripts

Windows scripts are used to control all the aspects of Windows. They are created using a powerful scripting language that this operating system has built-in. The basics of Windows scripts for Windows XP are what we will talk about here. You must also know that Windows 98 was the first operating system of Microsoft with scripting included. If you want to finish your job easier and faster you need to create Windows scripts. You will just need to use your computer to get this help. As you have experienced, computers are one of the most helpful devices invented by the human mind. But if you want to finish your tasks in the computer in the shortest time possible you need Windows scripts.

In the next lines we are going to talk about what you can do using Windows scripts. We will talk about variables, importance of scripts, OCR, comments, how to create your first script and many other interesting things.

There are many Windows applications to automate all your tasks. You can use standard programming paradigms to go beyond step repetition. You will also find many of them with OCR techniques included. This way you will recognize the most difficult words. Your Windows scripts can be run via schedule with the use of the Task Scheduler. This computer program is included in every copy of Windows.

We just need to launch the Notepad to start off creating Windows scripts. These are the names of other editors you can use: SciTE, Scintilla and Script Editor. But most of the time Notepad will be enough. When you finish writing the script you need to give it the .VBS extension.

If you want to write out your first script, please open your Notepad and type the following line: wscript.echo “Hello World” and that is all. If you double click on the file a pop up will show up with “Hello World” in it. But you can also use the command prompt and type “cscript hello.vbs” as well.

If you are a programmer, you will need to comment your programs if you want to know what they are all about in the future. A comment will not be seen by anyone but you. Your program will not be affected in any way if you write comments. Others will know what a piece of code is all about if you comment on it. To write a comment in a VBS file you just need to type REM at the beginning of the line and start off writing in the same line your comment. If an error happens, Windows will let you know about it. It will also let you know about the line that has the error.

All Windows scripts use variables to store strings and values. All you need to do to give a value to a variable is to type its name followed by the = sign. For example, ‘store = 24’ will be fine. The variable “store” holds the value “24” in the previous example. To create input boxes you will use the following command: InputBox(“message”). For example, store = InputBox(“What is your store?”) will display an input box asking for a store name. The value of the input box will be stored in the variable “store”.

If you want to really speed up your tasks you need to get the help of a computer. Windows scripts are here to make your dream come true. You can automate almost anything in Windows and this is thanks to the help of Windows scripts. As you have seen in the above lines, creating a script in windows is not rocket science. If you want to automate Windows using scheduled task you need to use the Task Scheduler.

You must also remember that you need to comment almost all the pieces of your scripts. The reason is that if anyone will ever need to modify your script, he/she will know what your program is all about if you leave comments on it as we said above. This is a very easy task and you will avoid a lot of problems in the future. Windows scripts are here to stay because your productivity will be enhanced using them. You need to automate most of your tasks and Windows scripts, the Task Scheduler and many other tools will help you a lot.





Leave a Reply

Your email address will not be published. Required fields are marked *