Hi guys, have you ever wondered how cool it would be if your computer starts to talking to you and starts to greet you every time when you turn on your system. This isn’t something that can’t happen.
Today we are going to make our dream come true. That’s right today I’m going to show you guys how we can build a simple program to greet you on every startup and open few basic applications. We have already done an article on how to make your computer welcome you everytime it starts but this is an advanced version of that. Cool part is that you don’t have to run this program, it will automatically run on every startup.
Do you remember that in my last post I discussed on how we can create a simple text to speech program that is the basic concept used in here. We will use the same language (Vbscript) to build this program.
And as usual you don’t need any IDKs or compilers to run this program. All that you need is an text editor (Notepad).
Okay let’s start with a simple process :
- This program is built in such a way that on every startup it will open your default browser and loads some predefined URLs, so make sure your computer is always connected to the internet.
- Open the notepad in your system and start writing the below code.
URL = "www.google.com"
URL1 = "https://www.facebook.com/"
URL2 = "https://web.whatsapp.com/"
Set objShell = Wscript.CreateObject("WScript.Shell")
sapi.Speak ("Its good to see you again sir.")
sapi.Speak ("Coding geek system initiated")
sapi.Speak ("connecting to world wide web, global IP obtained")
sapi.Speak (" System is fully operational")
sapi.Speak ("initiating basic programs")
sapi.Speak ("Have a nice day sir")
Set objShell = Nothing
- And now save it by pressing ctrl+S and select .vbs as file extension.
- Now this is the important step, copy the file to the following location to execute this program on every startup.
- Press windows key+r to open the run window. Type %appdata% and hit enter.
- An new windows opens from there go to this location : Microsoft -> Windows -> Start Menu -> Programs -> Startup and paste your .vbs file.
- From now on when your system booted this program will be executed.
Let’s just not copy and paste rather try to type the whole code by yourself, trust me you will get some ideas while typing it.
And now GEEK section:
This program has lots of cool features and fully customizable, but you should know to do that!! Geeks prefer to know more that any other normal users right ? That’s why we are called geeks! Lets see what we need to now about this code to fully customize it :
- First we declare several variables using the DIM. (line no. 1)
- Then we assign some website URLs to the variables like ‘URL1′,’URL2’ (line no. 2-4)
- Then we create two objects sapi and objShell, where sapi is the voice object and the objShell is the object shell to run commands.
- Then we use ‘Speak’ function with sapi to make the computer talk.
- And ‘Run’ function with ‘objShell’ to run the programs (to open applications).
- In line no. 8 , ‘Wscript.Sleep’ is the function used to pause the program for the given milliseconds.
- Finally objShell is set to nothing.
- That’s it, this simple code can greet you when every you turn on your PC.
That’s it guys hope you liked it. You can give your suggestions and ask queries below. Stay tuned from more cool stuffs!!
Do Share and Subscribe.
Keep Coding!! Happy coding!!