How to Write Computer Script

Save
Next Video:
Erase a Computer Hard Drive....5

To write computer script, open Visual Basic Scripting in Windows, create a command to write text on the screen and then run a Windows command to execute the script. Investigate the scripts that can be written using Visual Basic Scripting with help from a software developer in this free video on computers.

Part of the Video Series: Computer & Internet Tips
Promoted By Zergnet

Comments

Video Transcript

Hi my name is Dave Andrews and today I'm going to show you how to write computer script. We are going to use a very simple scripting line which is built into windows that is called Visual Basic Scripting or VBS. Let's go to our computer and as you can see I have a script file here that basically does a four loop, now what a four loop does is it loops a number in this case from 0 to 7 so our variable eye will go from 0 to 7 and will execute all of this code every single time. So basically this will loop seven times more or less or rather eight times because you go from 0 to 7 and what this is going to do is it is going to run a command in Visual Basic Scripting called the wscript.stdout.write and what that is going to do is basically write text to the screen and the text it is going to write is hello world. We follow that with an echo command that is going to print out a new line and that way all of our hello worlds don't show up compressed right to each other and I'm going to give you a little demonstration of how this works and let's open up our command prompt and we are going to type in cmd and let's go to the directory of where that script is stored and we are going to run a windows command that comes with windows called cscript which will actually execute that command and we are going to give it the file name which is script.vbs. As you can see there are all of our hello worlds right there displayed immediately after each other. This is just a very simple example. There is a lot you can do with window scripts and if you want to investigate this further just do like a google search or a windows visual basic script. My name is Dave Andrews and I've just showed you how to write computer script.

Featured

Related Searches

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!