Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Other Programming > VBScript
|
VBScript For questions and discussions related to VBScript.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VBScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 2nd, 2009, 12:33 AM
Authorized User
 
Join Date: Apr 2009
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
Default VBScript Spacing For Chart Creation Routines

With GW-BASIC, there were no Character Spacing differences between the Computer Code Commands and the Output Text Boxes.

With VBScript, there is a difference in Character Spacing within the Code Commands and the Output Boxes.

This needs to be fixed.

These Forum Postings have the same problem with Character Spaces as VBScript does.
?Coding Problems with Black Box Code Files?

"?Why not just create a Text Document then 'Cut & Paste' that Text Document into the Code (create a File Name Tag in the Code linking to that Text Document which is then called up within the Code)?"

Because...
1-- I don't want to go through such complicated procedures.
2-- The process requires creating and modifying 2 separate documents: the Code itself; and, the Text Document.

With my own Computer Programming Projects (especially GW-BASIC), I like to create "Text Pages" describing the Computer Program being RUN. Some of my Computer Programming Projects are Computer Games. My Computer Games uses Data Charts for displaying information.

EXAMPLE: "BattleTech Data Sheets" for my GW-BASIC Computer Program that is based on FASA's "BattleTech: A Game Of Armored Combat" 2nd Edition.

The following chart is a Sample Chart for a Computerized Miniatures Wargame concept that I am working on. However, it has to be modified for display within this Posting.

Below is (sort of) the Print-Out Version of a Data Chart for my Computerized Miniatures Wargame Concept.

T . H . E . O . R . E . T . I . C . A . L . . . R . E . S . O . L . U . T . I . O . N . . . T . A . B . L . E
_ __ _D E F E N D E R
_ __ _L0 _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9
A L0 .+0 ._-1 ._-2 ._-3 ._-4 .-5 ._-6 _-7 ._-8 ._-9
T L1 .+1 _+0 ._-1 ._-2 _-3 ._-4 ._-5 .-6 ._-7 ._-8
T L2 .+2 _+1 _+0 ._-1 _-2 ._-3 _-4 _-5 ._-6 ._-7
A L3 +3 .+2 ._+1 _+0 _-1 ._-2 _-3 _-4 ._-5 ._-6
C L4 +4 _+3 _+2 _+1 _+0 _-1 _-2 _-3 ._-4 ._-5
K L5 +5 _+4 _+3 _+2 _+1 .+0 _-1 .-2 ._-3 ._-4
E L6 +6 _+5 _+4 _+3 _+2 _+1 .+0 .-1 _-2 ._-3
R L7 +7 _+6 _+5 _+4 _+3 _+2 .+1 +0 _-1 ._-2
_ L8 +8 _+7 _+6 _+5 _+4 _+3 _+2 +1 +0 ._-1
_ L9 +9 _+8 _+7 _+6 _+5 _+4 _+3 +2 .+1 .+0

Below is the VBScript Code of the Data Chart for my Computerized Miniatures Wargame Concept.

Code:
MsgBox "T  H  E  O  R  E  T  I  C  A  L     R  E  S  O  L  U  T  I  O  N     T  A  B  L  E" & vbNewLine & _
  "........D E F E N D E R" & vbNewLine &
  "_ __ _L0 _L1 _L2 _L3 _L4 _L5 _L6 _L7 _L8 _L9" & vbNewLine & _
  "A L0 .+0 .-1 .-2 .-3 .-4 .-5 .-6 .-7 .-8 .-9" & vbNewLine & _
  "T L1 .+1 +0 .-1 .-2 .-3 .-4 .-5 .-6 .-7 .-8" & vbNewLine & _
  "T L2 .+2 +1 +0 .-1 .-2 .-3 .-4 .-5 .-6 .-7" & vbNewLine & _
  "A L3 .+3 +2 +1 +0 .-1 .-2 .-3 .-4 .-5 .-6" & vbNewLine & _
  "C L4 .+4 +3 +2 +1 +0 .-1 .-2 .-3 .-4 .-5" & vbNewLine & _
  "K L5 .+5 +4 +3 +2 +1 _0 .-1 .-2 .-3 .-4" & vbNewLine & _
  "E L6 .+6 +5 +4 +3 +2 +1 +0 .-1 .-2 .-3" & vbNewLine & _
  "R L7 .+7 +6 +5 +4 +3 +2 +1 +0 .-1 .-2" & vbNewLine & _
  "_ L8 .+8 +7 +6 +5 +4 +3 +2 +1 +0 .-1" & vbNewLine & _
  "_ L9 .+9 +8 +7 +6 +5 +4 +3 +2 +1 +0"
NOTE: "THEORTETICAL RESOLUTION TABLE" is Double-Spaced between each Character".

NOTE: I use 2 Character Spaces at the beginning of each Continued Command Line.

NOTE: "L#" = Level Number ... thus ... "L0" = Level 0 ... "L9" = Level 9

NOTE: While writing the Code unto this Post, Attacker Level 0 thru Attacker Level 8 kept the same length. However, on my COMPAQ computer, these Commands Lines are of different length; with, the Level 0 being the longest; and, Level 8 being the shortest.

NOTE: With GW-BASIC, I wouldn't have needed to use "." and "_" within the Code for proper spacing within the Computer Output Text Graphics" in order to make this Data Chart accurately readable.

Last edited by Tandy1000SL GW-BASIC; November 2nd, 2009 at 01:04 AM..
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple "Worksheet_Change" routines seventy9mph Excel VBA 6 May 1st, 2009 05:42 AM
Routines in MYSQL js_newbie MySQL 4 April 1st, 2007 07:32 PM
interval timed calls to asp routines NickOg Javascript How-To 6 November 5th, 2004 03:55 AM
Using Customized chart for Pivot Chart kliu9 Excel VBA 3 October 13th, 2004 09:37 AM
Drill Down from Bar Chart to another chart snowbird Crystal Reports 0 July 11th, 2003 01:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.