VB Scripting!

Eeben

Fledgling Freddie
Joined
Jan 7, 2004
Messages
3,607
Anybody who has a good tutorial? An not a tutorial how to get vb working with html since i wanna learn it for logon scripting on windows servers an stuff.. Been trying to find one on google but cant seem to find any!!!
 

Eeben

Fledgling Freddie
Joined
Jan 7, 2004
Messages
3,607
use ASP, its designed for that sort of thing :)

didnt know :( always been told to use vb scripts instead of bat.files an now that i wanna try i cant find any tutorials on how to do it :p
 

Chronictank

FH is my second home
Joined
Jan 21, 2004
Messages
10,133
didnt know always been told to use vb scripts instead of bat.files an now that i wanna try i cant find any tutorials on how to do it

vb script isnt the same as visual basic, thats why Nate asked if you were doing visual basic :)

vb script is essentially a dumbed down version of vb for quick and dirty scripting,
whoever told you to use it over batch files is right :)
Its essentially the same as a batch file with some syntax differences and additional functionality;
Miscorosft actually has quite a good set of documents for it:
VBScript User's Guide

Good luck :)
 

Eeben

Fledgling Freddie
Joined
Jan 7, 2004
Messages
3,607
vb script isnt the same as visual basic, thats why Nate asked if you were doing visual basic

vb script is essentially a dumbed down version of vb for quick and dirty scripting,
whoever told you to use it over batch files is right
Its essentially the same as a batch file with some syntax differences and additional functionality;
Miscorosft actually has quite a good set of documents for it:
VBScript User's Guide

Good luck

thx :D help knowing what your doing :p hehe..

Been on that link allready an dont find it very usefull :( im pretty new to programming an stuff so i need a guide of noobs tbh :p (well know some basics but thats about it)
 

Nate

FH is my second home
Joined
Mar 13, 2004
Messages
7,454
yeah, thats why i asked <walks away slowly, whistling>
 

Chronictank

FH is my second home
Joined
Jan 21, 2004
Messages
10,133
most of it will work anyway, the code is the stuff between <script></script>
you dont need the rest really
You just write it in a text file and save it with the .vbs extentsion

some basics for you, if you paste it in notepad, save the file as whatever.vbs you can see what happens

filename: vbscriptbasic.vbs
Code:
'Force all variables to be declared
Option Explicit

'Sets Global Variable Names
Dim strVariable				'this is a variable

'Main body of code
strVariable = "1"

If strVariable = "1" then 		'this is the structure of a if..then..else loop
  MsgBox "The if statement is true"
Else
  MsgBox "The if statement is false"
End if

Call aSubRoutine			'this is how you call a subroutine

'***Subroutines***
Sub aSubRoutine					'this is how you declare a subroutine
  Dim strlocalVariable				'this is how to declare a local variable, it only exists 
						' inside this sub routine
  strlocalvariable = "1" 			'this is how you enter a value into a variable
  MsgBox "strlocalVariable = " + strlocalVariable 'print the variable contents
End Sub
 

Users who are viewing this thread

Top Bottom