Valhalla Legends Archive

Programming => General Programming => Topic started by: j0k3r on September 16, 2003, 05:39 PM

Title: Scripts
Post by: j0k3r on September 16, 2003, 05:39 PM
Can anyone give me a quickoverview (no links please to description of a script, maybe to some vb scripting tutorials though :P) on what a script consists of, and how they work?

Thanks.
Title: Re:Scripts
Post by: Banana fanna fo fanna on September 16, 2003, 05:51 PM
A script is generally a short program in a stripped-down language that is used manipulate another program.
Title: Re:Scripts
Post by: Camel on September 16, 2003, 06:48 PM
In VB, you can use the MS Script Control (msscript.ocx).
Title: Re:Scripts
Post by: j0k3r on September 17, 2003, 04:26 PM
Ok say I wanted to make a script and bind it to a key on my keyboard (I have unused keys...), I know how to link the key but how do I make it a script, because to the best of my knowledge scripts don't use as many resources as a program.

[edit]And how do I start the program as a script in VB? I need some sort of a direction or instruction on how to make a script in VB[/edit]
Title: Re:Scripts
Post by: iago on September 17, 2003, 04:55 PM
Well, the classic way to script is to put your commands into a plain-text file.

On windows, call the file blah.bat.
On linux, give the program permissions 0700 (chmod 0700 blahscript).

Then just type the name to run it.
Title: Re:Scripts
Post by: j0k3r on September 17, 2003, 09:45 PM
1. How does the OS know how to compile it as a VB file if I write it in VB?

2. What do you mean by just type the name? If I just typed the name in an msn chat room it would execute the script?
Title: Re:Scripts
Post by: iago on September 17, 2003, 10:29 PM
No, type the name from a shell, either cmd.exe or bash or kshcr or whatever you like