Internet & Computer
Computer Tips, Guide to Computer and Internet Help |
|||
How to Write Computer Script
Today I'm going to show you how to write computer script. We're going to use a very simple scripting line which is use and build in the windows that is called the Visual Basic Scripting or VBS. Let’s go to our computer, let’ see we have a script out here, that basically has a For Loop, now, what a Loop does is that it loops a number that does in this case from zero to seven. So, our variable "i" would go from zero to seven and we're executing this code every single time. So, basically this will loop seven times, more or less rather eight times, that gets zero to seven. And what this is gonna do: its going to run a command in Visual Basic Scripting at "wsript.STDout.write" and what's going to is basically do is write a text to the screen and the text is gonna write "Hello World" will follow that with and Echo Command that’s gonna print out a new line. That way all our "Hello World” don’t show up and they'll compress right next to each other. I’m just going to give you a little demonstration how does it work. We're talking about our command prompt, we're gonna type in CMD, lets go to the directory were the script is stored, we're gonna run a windows command that comes with windows called C script. Which will actually execute that command and we're gonna give it a file name which is "Script.VBS". As you can see, there are all our "Hello World's" right there displayed immediately after each other. This is just a very simple example, there's a lot you can do with windows scripts and if you wanna just skip this further just do like a Google search for Windows Visual basic Script. My name is Dave Andrews and I’ve just showed you how to write computer script.
| |||