Ok lets get started with these tutorials. first open notepad and get ready to type.
______________________________________________________________________________________________________________________________________
-How to make a message box-
In notepad type x = msgbox ("hello world")
now save it as HW.vbs and open it. you have just made your first script. now we will work on a more complicated one. i am going to paste the script below and then explain to you how it works
x = msgbox ("is two plus two four?",4)
if x=7 then msgbox "wrong"
if x=6 then msgbox "correct"
x = msgbox (" you have just made your very own script")
You may of noticed the ,4 i put in the first line. the 4 makes the message box have a yes and no option. in the second line there is the if command which will activate if the user presses "no". x=7 is the no option and x-6 is the yes option. the then command tells what will happen after you press no or yes. you will also notice that VBS goes on a line by line basis where each line is run in the order u put it in, so that means if u put a new message box script line after the yes and no options ( line 4) that message box will appear after you click ok.
The third thing that i can teach you is how to make your computers caps key go on and off randomly. this one can be really annoying lol.
Set wshShell =wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "{CAPSLOCK}"
loop
The first line in this script simply sets the settings for the script and after that is done the "do" command is activated and will start the script. we will be focusing on the 4th line in the script which will be doing most of the stuff. the command line wshshell.sendkeys "{CAPSLOCK}" makes your computer activate caps lock. the line after that is called "loop" and simply starts the script from the beginning over and over again. the third line makes a wait in between the loop so you can actually see the caps lock flashing.
The last one i can offer is by far the most annoying script ever mainly because you cant do anything because your keyboard is continuously typing the alphabet into your computer. if you run this one you will have to logoff oyur computer to delite it lol.
Set wshShell = wscript.CreateObject("WScript.Shell")
do
wscript.sleep 100
wshshell.sendkeys "abcdefghijklmnopqrstuvwxyz."
loop
This one is just like the other one but types on the alphabet so you cant do anything but shutdown your computer. of course it is completely hamless and not permanent, unless you put it in your start up... then you will need rally fast fingers to delete the thing before it starts so don't even try lol.
As always have fun and enjoy. please press the like button on the main page of this website