Programming: How To Use VBScript

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Post Reply
Uber-Banana





Posts: 84
Joined: Wed Oct 13, 2004 4:17 pm
Location: Loading Comment...
Contact:

Programming: How To Use VBScript

Post 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
Cheech|N|Chong





Posts: 115
Joined: Fri Jan 14, 2005 9:26 am
Location: Why The Fuck Would I Tell You? Indiana...
Contact:

Post by Cheech|N|Chong »

hmm...thx I heard somethin about vbscript being used on webpages but wasnt sure how thx again
Signature exceeded 75KB.
looknbarrel




Coagulator Miner

Posts: 467
Joined: Sat Mar 19, 2005 7:59 pm

Re: How to use VBScript

Post by looknbarrel »

Uber-Banana wrote:making cookies maybe :)
I'm not that good at baking.lol just kidding great tutorial
superaison





Posts: 175
Joined: Mon Jul 25, 2005 5:06 pm

Post by superaison »

um Noob Question Time:

does rregular vb code work in vb script?
Klaz0r





Posts: 49
Joined: Tue Jul 27, 2004 2:36 pm

Post 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.
User avatar
Phenomena





Posts: 1510
Joined: Thu Jul 01, 2004 3:25 pm
Location: Training my ducks
Contact:

Re: Programming: How To Use VBScript

Post 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
Image
And if they don't accept Jesus as their Personal Savior, you can kill them later. How cool is that!
selyb





Posts: 32
Joined: Sun Mar 19, 2006 7:23 am

Post 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
Post Reply