Beginner VBS (Visual Basic Script) [TUT]
Page 1 of 1 • Share •
Beginner VBS (Visual Basic Script) [TUT]
Beginner VBS
Okay, let's get straight into it.
1 ) Open Notepad, if you can't find it, go to Start -> Run -> Notepad.exe
2 ) Type (or copy and paste) the following into Notepad.
Msgbox "Hello World!"
3) After, go to File -> Save As ->
Save the file name as 'Test.vbs'
Click the dropdown arrow on 'Save as type' and select 'All files'. If you don't do this, it will not work.
Save it anywhere.
4 ) Find the file and open it, you should see this:

Adding icons, titles and options.
1 ) Okay, this is slightly more complex, the options won't actually be an existing command, because this is only a beginner tutorial.
2 ) Open another notepad.
3 ) Insert the following;
Msgbox "Would you like to activate the hack?", _
vbYesNo + vbQuestion, _
"The-Underground"
4 ) Repeat the previous steps, ensuring you save the type as All files and putting '.vbs' at the end of the name.
5 ) Locate the file and open it, you should get this:

Template
1 ) You can use this template to change the above:
Msgbox " MESSAGE " <--- You put your message in here.
vbCHOICE <--- You can put many thing's in here, for example:
vbOkOnly
vbOkCancel
vbYesNo
+ vbICON, _ <--- Again, you can put many thing's in here, that will decide the icon.
vbCritical (Red Cross)
vbQuestion (Blue question mark)
vbInformation (Information icon)
vbExclamation (Yellow exclamation mark)
" TITLE " <--- This is what you want the title to be, so for example the one you made earlier was "The-Underground."
So, here is the finnished basic template:
Msgbox " MESSAGE ", _
vbCHOICE + vbICON, _
" TITLE "
Only change the stuff in capitals, the two bits which are a comma and underscore ( , _ ) must remain.
Keep alert for the Intermediate and Advanced VBS tutorials!
Thank's for reading, any corrections or questions leave a comment.
-Oliver.
Oliver- Admin
- Posts : 8
Join date : 2009-05-14
Age : 24
...
Wow, A very usefull tutorial, maybe you could show us how to open files using one of the decesions on another TUT, thanks very much oliver.
REP ++
Kiz
REP ++
Kiz
Logic_Bomb- Admin
- Posts : 161
Join date : 2009-05-12
Age : 26
Location : Cyberspace
Re: Beginner VBS (Visual Basic Script) [TUT]
Nice one but ill think I stick to VB6 and VB2008 instead of notepad...
But anyways great for n00bs
thumbsup

But anyways great for n00bs

thumbsup


Matsen- R4TT3R
- Posts : 75
Join date : 2009-05-24
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum