Page 1 of 1

Programming: How To Use VBScript

Posted: Mon May 16, 2005 2:50 pm
by Uber-Banana
How to use VBScript


What is VBScript? VBScript is basicallly VB implemented into webpages, for example, inputboxes that pop up in IE.

Example of VBScript:

<script language="VBScript">
<!--
Dim Text As String
Text = InputBox("What is your name?")
document.write Name
-->
</script>

Why use VBScript?

Because it is BETTER THAN JAVASCRIPT, i dont care what people tell you.

And because it makes you seem smarter when ur creating web pages.

Another Example, making cookies maybe :)

<script language="VBScript">
<!--
Try
My.Computer.FileSystem.WriteAllText("C:\Temp\Web Pages\Temp.txt")
Catch fileException As Exception
Throw fileException
End Try
-->
</script>

this will, to my knowledge, create a file named Temp.txt in that directory, if it exists, but that is standard VB, i dont know if that will do anything, i know nothing.

How to code....

Pretty much, you need to know VB, here is all that is new

type in

<script language="VBScript">
<!--
(type in your VB Code here)
-->
</script>

that is pretty much it

Posted: Mon May 16, 2005 4:02 pm
by Cheech|N|Chong
hmm...thx I heard somethin about vbscript being used on webpages but wasnt sure how thx again

Re: How to use VBScript

Posted: Tue Jun 21, 2005 6:41 am
by looknbarrel
Uber-Banana wrote:making cookies maybe :)
I'm not that good at baking.lol just kidding great tutorial

Posted: Sat Dec 24, 2005 10:32 am
by superaison
um Noob Question Time:

does rregular vb code work in vb script?

Posted: Sat Dec 24, 2005 5:41 pm
by Klaz0r
I'm pretty sure that its just a toned down version of VB, like, it doesn't have all of the functionality, but it has some. So some code will work, but some of the advanced code might not.

Re: Programming: How To Use VBScript

Posted: Thu Jan 05, 2006 3:36 pm
by Phenomena
what kind of VB? VB6 or VB.net

and if you used VBscript on a site.... then macs wouldnt be able to view it... would they? lol

Posted: Mon Jul 17, 2006 7:09 pm
by selyb
VBScript is a really toned down version of VB

e.g. you cannot create variable types, all variables are variants
also, there is no native binary handling
there also are no native collections: you have to create a Scripting.Dictionary object

there is no native file handling: you have to create a Scripting.FileSystemObject

VBScript in web pages is severely limited in comparison to standalone vbs's

an excellent VBScript resource exists at http://www.devguru.com/Technologies/vbs ... _list.html