I am using Windows 8 Script Host for the following VBS Code.
These are the relevant excerpted Command Lines from my VBS File.
NOTE: I am not using the "Option Explicit" Command for this VBS Code. I generally avoid using "Option Explicit"; because, it alters the behaviors of the VBS Commands & Variables & Constants & Error Codes.
?How can I get each Terrain Type Letter Code colored in a specific Color?
I am getting the "Name Redefined" Error 800A0411 for each of the Color Constants.
?How can I create a 24x120 Random Text area within a MsgBox, or other, Window?
?Is this Project better suited for the Command Prompt Programming?
I would have no problem with writing this Project in GW-BASIC on a Pre-Y2K Computer Platform.
Yea...GW-BASIC was a DOS Platform that worked on the Command Prompt Format; and, VBS is primarily works on a Windows Platform and not on the Command Prompt Platform.
?If Visual BASIC Script isn't capable of this type of Computer Programming Project; then, what Y2K+ Computer Language is capable of this type of Project?
'VISUAL BASIC SCRIPT WORLD MAP TERRAIN CODE
'W = Water vbBlue
'D = Dirt vbMegneta
'R = Rock vbBlack
'S = Sand vbCyan
'G = Grass vbGreen
'F = Flower vbYellow
'T = Tree vbRed
'A = Atomic Element vbWhite
'WORLD MAP GENERATION
'World Map Area = 24 Vertical * 120 Horizontal
'World Terriain = Water/Dirt/Rock/Sand
'Dirt/Rock/Sand = Empty/Grass/Flower/Tree
'Rock = Empty/Atomic Element
Dim ComputerGM 'Variable used for calling Game System Related Computer-Only Procedures
Dim TerrainType 'Variable used by the "WorldTerrain" Function for determing the Type Of Terrain
Dim intTerrainType 'the Integer Value of the "TerrainType" Variable
Dim strTerrainType 'the String Value of the "TerrainType" Variable
Constant vbBlack = &h00
Constant vbRed = &Hff
Constant vbGreen = &hFF00
Constant vbYellow = &hFFFF
Constant vbBlue = &hFF0000
Constant vbMagneta = &hFF00FF
Constant vbCyan = &hFFFF00
Constant vbWhite = &hFFFFFF
For Polar = 1 to 24
For Equator = 1 to 120
ComputerGM = WorldTerrain
Print vbBlue & strTerrainType;
Function WorldTerrain 'World Map Terrain Selection
Randomizer = TimeSeeder 'using the "TimeSeeder" Function for generating a Random Seed Number
TerrainType = Rnd * 10
intTerrainType = Int(TerrainType)
If intTerrainType => 0 and intTerrainType =< 2 Then
strTerrainType = "W" 'Water
ElseIf intTerrainType = 3 or intTerrainType = 4 Then
strTerrainType = "D" 'Dirt
ElseIf intTerrainType = 5 or intTerrainType = 6 Then
strTerrainType = "R" 'Rock
ElseIf intTerrainType => 7 and intTerrainType =< 9 Then
strTerrainType = "S" 'Sand
MsgBox "Error -- 'WorldTerrain' Function" & _
vbNewLine , , "[VBSplanetology.vbs]"
End If 'intTerrainType
End Function 'World Terrain