Steve Jackson Games - Site Navigation
Home General Info Follow Us Search Illuminator Store Forums What's New Other Games Ogre GURPS Munchkin Our Games: Home

Go Back   Steve Jackson Games Forums > Roleplaying > GURPS > GURPS Character Assistant

Reply
 
Thread Tools Display Modes
Old 11-02-2020, 06:40 PM   #1
johnnyschad
 
johnnyschad's Avatar
 
Join Date: Oct 2005
Location: Northwest Iowa
Default Creating new sheets

I'd like to design a new sheet and am mostly getting along with shameless hacking of previous sheets. I know that the sheets are using some sort of Visual Basic Scripting, but googling for syntax for some commands are not giving me good results. The FlexSheet uses a "StartTable" command. I would like to know how to set the left-hand x position of the table. More generally, I'd love to find a written guide for whatever version of Visual Basic Script this is. Thank you in advance for any advice you can give me.
__________________
Learn to love, love to learn.
johnnyschad is offline   Reply With Quote
Old 11-04-2020, 12:58 PM   #2
Armin
GCA Prime
 
Armin's Avatar
 
Join Date: Aug 2004
Location: Portland, OR
Default Re: Creating new sheets

The sheets in GCA4 use VB script from Microsoft's scripting engine. Some of the stuff you're seeing may be either direct access to the third-party print engine, or custom helper routines I provided to make some things easier for sheet writers.

The print engine used by GCA4 is VSView/VSPrint, which is a print & preview engine from VideoSoft. (Years ago, VideoSoft became part of ComponentOne, which is now owned by GrapeCity. )

There are some helpful tips, bits of docs, and a link to some VSView docs (for a bit newer version) on the GCA Wiki.

AddTable and TextBox are part of my print sheet helper library. I don't think I have any docs for most of that stuff here anywhere, but I found a partial doc I wrote, which I'll include here.

Quote:
----------------------------------------------------------------------
AddTable [Procedure]
----------------------------------------------------------------------

AddTable Format, Header, RowText, HeaderColor, BackColor, Append

Format is a specially formatted string containing information about columns, alignments, and widths. This string is not printed, but is used to format the table information. Column information is separated by the column separator character: |. Here's an example format string:

fmt$ = "<2|>3|^1"

This format string would create three columns, the first 2 inches wide and aligned left, the second three inches wide and aligned right, and the last one inch wide and centered. (Note that the widths are based on the ScaleMode set by the user; if it is set to centimeters, then the example column widths would be set in centimeters rather than inches.)

Special characters in the formatting:

< align column text to the left
> align column text to the right
^ center column text
= justify column text
+ vertically align column text to center of table cell
_ vertically align column text to bottom of table cell
* align using the TextAlign property
~ prevents word wrapping on the column
! draws a vertical border to the right of the column

Header is the text for the header line of the table. Separate the text for each column using the column separators.

RowText is the text for the current row of the table. Separate the different column text using the column separators. If you are using RTF, be sure to enclose the RTF text of any column in curly {} braces.

HeaderColor is the background color of the cells containing the Header text.

BackColor is the background color of the cells containing the RowText text.

Append is True if you're adding the current text to an existing table, and don't want the Header text to be printed before the current line being added to the table.



----------------------------------------------------------------------
TextBox [Procedure]
----------------------------------------------------------------------

TextBox Text, X, Y, Width, Height, [ Wrap ], [ Calc ], [ Shade ]

Text is the text to be printed

X, Y are the Left and Top positions, respectively. Since you're going outside the wrapper, these are in twips by default, but you may append an "in" to each to make it into inches.

Width is the width of the text box.

Height is the height of the text box. If you set this to zero, it will calc the height necessary to have the text fill the box.

Wrap is True to turn word wrap on (default is True).

Calc is True to only calculate space taken (returned in TextHei or TextWid), but not print. Defaults to False.

Shade is True to outline the box in the current pen, and shade the box with the current brush, defaults to False

So, basically, set everything as you want it, but set Height to 0, and Calc to True, and you can use TextHei to get the height that the box of text would be. TextWid should the return your set Width.
__________________
Armin D. Sykes | Visit my GCA5 blog for updates and previews. | Get GURPS Character Assistant 5 now at Warehouse 23.
Armin is offline   Reply With Quote
Old 11-15-2020, 02:28 PM   #3
johnnyschad
 
johnnyschad's Avatar
 
Join Date: Oct 2005
Location: Northwest Iowa
Default Re: Creating new sheets

Excellent.

Thank you (again)!
__________________
Learn to love, love to learn.
johnnyschad is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Fnords are Off
[IMG] code is Off
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 05:08 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2024, vBulletin Solutions, Inc.