home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-01-19 | 85.8 KB | 2,170 lines |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PCBSuperScript v2.0
- ─────────────────────
- ───────────────
- ─────────
- ───
- ─
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- (c) Copyright 1990, 1991 by Chris Curran and Aquila Data Systems, Inc.
- All rights reserved.
-
- All trademarks and copyrights belong to their respective holders.
-
-
- Products Used
- -----------------------------------------------------------------------------
-
- C compiler : Borland C++ v3.0 (Borland)
- Assembler : TASM v3.0 (Borland)
- Linker : TLink v5.0 (Borland)
- Debugger : TDebug v3.0 (Borland)
- Version Control: PVCS for DOS (Sage Software)
- Editor : QEdit 2.15 (SemWare)
-
-
- The CKIT door library was also used in the development of this product
- (version 2.10). It supports the MSC, QuickC and Turbo C compilers. It is
- highly recommended to any 'C' programmer with any door project in mind.
- Some 'C' programmers seem to have a problem with the number of revisions
- that this library went through at the beginning - I don't. I view it as
- positive reaction to user request.
-
- The author of CKIT can be reached via:
-
- Data-Comp Information Systems
- Attn: Rickie W. Belitz
- P.O. Box 5895
- Maryville, Tenn. 37802-5895
-
- BBS: (615) 982-6537 (Hayes Ultra V.32, public line)
-
-
-
- Disclaimer
- -----------------------------------------------------------------------------
-
- The author hereby disclaims all warranties relating to this product,
- whether express or implied, including without limitation any implied
- warranties of merchantability or fitness for a particular purpose. The
- author cannot and will not be liable for any special, incidental,
- consequential, indirect or similar damages due to loss of data or any
- other reason, even if the author or an authorized agent has been advised
- of the possibility of such damages. In no event shall the liability for
- any damages ever exceed the price paid for the license to use the
- software, regardless of the form and/or extent of the claim. The user of
- this program bears all risk as to the quality and performance of the
- software.
-
-
-
- License
- -----------------------------------------------------------------------------
-
- PCBSuperScript is a Shareware product. As such, it is made available to
- the general personal computing public for evaluation. Users are licensed
- to operate this program on their personal computers for the purpose of
- test and evaluation on a trial basis for a limited trial period. It is
- not possible to reasonably define the limits of a fair and equitable time
- period for evaluation; therefore it is left to the user's judgment and
- sense of fair play as to the time required to make a decision as to its
- usefulness. If the user decides the program is not of sufficient merit to
- warrant purchase through registration with the author, he/she should
- remove the program from his/her personal computer. Otherwise, if the
- program is deemed useful and is in regular use on the user's computer
- system, registration with the author is required.
-
- Registered users are those users who elect to pay for PCBSuperScript and
- register that payment with the author. By virtue of registration and
- payment for the program, registered users are granted a license to
- continue to utilize the program on their personal computer for as long as
- they choose. This license authorizes the user to use the program on any
- personal computer system he or she may own or use so long as the program
- is operated on only one computer system at a time.
-
-
- Guarantee
- -----------------------------------------------------------------------------
-
- PCBSuperScript is offered with an unconditional 30-day money-back
- guarantee. If you become dissatisfied with the program for any reason
- within that period, just let me know and your registration fee will be
- refunded. If you purchased a registration package which included a
- diskette and/or a manual, please return these when requesting a refund.
-
- This guarantee is unconditional. I would ask, however, if you are
- having a problem to let me know before giving up on PCBSuperScript since
- your problem may be something I can solve.
-
- Finally, if you order a registration package which includes a diskette
- or manual and either of these items are defective -- either through my
- error or through postal service "processing", let me know and I will send
- replacements promptly.
-
-
-
- Registration
- -----------------------------------------------------------------------------
-
- The registration fee is $25, payable to:
-
- Aquila Data Systems
- 304 Bayfield Drive
- Brandon, FL 33511
-
- The payment of this registration fee to the author entitles the user to
- full use of the product for an unlimited period of time in addition to
- product support. The distribution of diskette copies of PCBSuperScript
- and future upgrades is not included as part of the basic registration fee.
- See the ORDER.SS file for the charges associated with these services.
-
- PCBSuperScript is the sole property of Chris Curran. The program may be
- freely copied and transferred to individual parties for evaluation
- purposes. It may be posted on Bulletin Board systems (BBS) for electronic
- access as long as NO FEE is charged for its distribution except for
- private BBS operations that charge a regular user subscription fee.
- Computer information services such as Compuserve (CIS), Genie, and Byte
- Information Exchange (BIX) are authorized to post this product for
- subscriber access. PCBSuperScript may be distributed on diskette only by
- 1) disk distributors/vendors who are associate members of the Association
- of Shareware Professionals (ASP) or 2) users groups which do not charge
- more than a nominal fee ($5) to cover the costs of distribution. Any
- changes to these policies must be made in writing by the author.
-
- PCBSuperScript is a fully functional Shareware product. Shareware is a
- computer program distribution/marketing method that permits potential
- buyers to thoroughly try the program prior to purchase. It is NOT free and
- it is not in the Public Domain. If, after evaluating the program, you
- find it useful enough to use on a regular basis, you are expected to pay
- for it by registering with the author.
-
- Attractively-priced site licensing is available for commercial users.
- Pricing for "typical" site licensing is given later in this manual. If
- you have needs which are not met by the standard license terms, please
- call or write for a quote which addresses any unique support or product
- update requirements. Customization is also available on a contract basis.
-
- There has been some confusion in Shareware circles recently about
- upgrade/update policies for certain pieces of software. Therefore, I'd
- like to take this opportunity to spell out my policies. First, some
- definitions: I define upgrade as the RIGHT to use a later revision of a
- piece of software. I define update as the physical media on which the
- upgrade resides. I'll further define an update as not including hard-copy
- documentation unless specifically defined. With that out of the way, I'd
- like to spell out my current upgrade/update policies:
-
- There are no upgrade charges associated with PCBSuperScript and I do not
- have any plans at present to institute such charges with future revisions.
- I do reserve the right to do so, however, if in my sole opinion the nature
- and magnitude of PCBSuperScript changes to such a degree as to constitute
- an essentially new product. I currently do charge for updates and plan to
- continue to so charge. The content and pricing for specific update
- packages is contained in the ORDER.SS file. Pricing is subject to change
- without notice however, to accommodate postage, printing, and other price
- increases.
-
-
-
- Distributing PCBSuperScript
- -----------------------------------------------------------------------------
-
- PCBSuperScript may be freely distributed (subject to the for-charge
- distribution restrictions detailed in the Registration section).
- Therefore, please feel free to distribute copies of this program to
- friends, co-workers, bulletin boards, and users' groups. I do ask,
- however, that you please distribute all of the original files and not
- modified copies. Thank you in advance for your cooperation.
-
-
- Technical Support
- -----------------------------------------------------------------------------
-
- ┌─ Registered Users: Full technical support is available to registered
- │ users of PCBSuperScript. I have found that the most effective product
- │ support can be delivered through the electronic services listed below. If
- │ this option is not open to you, however, I also offer full product support
- │ through the mails, or, if the problem absolutely cannot wait, the
- │ telephone (no collect calls please). I will do my best to resolve any
- │ software bugs in a timely manner and I am always open to incorporating new
- │ features or changes which are appropriate to the nature of the product.
- │
- ├─ Unregistered Users: I will attempt to respond to software trouble
- │ reports made by non-registered users if the problems affect the general
- │ functionality of the program. Such users should not, however, expect
- │ product support beyond initial aid to determine if the program is suitable
- │ for their needs.
- │
- │ All Users: If you have a problem: I ask that, before calling or
- │ writing, you take the following steps:
- │
- │ 1) Check the manual. We all sometimes approach a piece of software
- │ with preconceived ideas about how it ought to work which may not
- │ correspond to how it actually does work. (Of course, I'm
- │ interested in your input if you have this sort of experience.)
- │
- │ 2) Have you loaded any new TSR's? Changed DOS versions? Modified any
- │ system files (CONFIG.SYS or AUTOEXEC.BAT) recently? Check to make
- │ sure these changes were done properly.
- │
- │ 3) Run a CHKDSK on your system. It's a basic thing, but we sometimes
- │ forget about it (at least I do).
- │
- │ 4) If you're still stuck, please aquire the following information
- │ and upload it to QExchange BBS:
- │
- │ a) Your hardware and software environment. PCBSuperScript is a very
- │ versatile program and, unfortunately, one of the downsides of
- │ this versatility is that settings can sometimes interact in
- │ unexpected ways. I try to test a broad range of environments
- │ and settings, but obviously can't try every one.
- │
- │ b) The sequence of actions which lead to the error. If I can't
- │ reproduce the error, it will be very difficult to correct it, so
- │ your help is vital in isolating the problem.
- │
- │ c) The PCBSS definition file and ALL associated files for that
- │ definition file (i.e. environment settings, PORT settings,
- │ etc.)
- │
- │ ***************************************************************
- └─────── * If you do not following the above steps for reporting PCBSS *
- * problems, I cannot help you. If you leave a message asking *
- * for help WITHOUT the above information, it will be IGNORED. *
- * *
- * This applies to registered and unregistered users alike. *
- ***************************************************************
-
-
- If you follow these steps, it will help me to solve your problem in a
- more efficient and timely manner.
-
- Contact via:
-
- QExchange BBS
- Line #1 (813)653-2937 1200-38,400 v.32/42
- Line #2 (813)685-4218 1200-38,400 v.32/42
-
- U.S. Mail
- Aquila Data Systems
- 304 Bayfield Drive
- Brandon, FL 33511
-
-
-
- Abstract
- -----------------------------------------------------------------------------
-
- PCBSuperScript is a script processing language designed to meet the
- needs of PCBoard Sysops. A "script file" is a standard ASCII file that
- contains a list of instructions to perform (somewhat akin to a BAT file).
-
- Since PCBSuperScript is a script processor, some degree of planning will
- be necessary. Just like you have to plan out (and test) large and advanced
- BAT files, you'll have to plan out the PCBSuperScript files.
-
- PCBSuperScript offers control features that are similar to many
- programming languages. You do not need to use all the features of
- PCBSuperScript, but if you want to use it to it's fullest, some degree of
- programming background will help. 'C' programmer's in particular will find
- PCBSuperScript a familiar environment.
-
- Before you become scared away from PCBSuperScript because you don't know
- programming, keep in mind that only advanced needs will require advanced
- scripts. Start off simple and work up to the advanced level. If you find
- the task impossible, leave me an example on my BBS and I'll try to point
- you in the right direction. I won't write the script for you, but I will
- advise on the method to use.
-
-
- Some of the things you can perform with PCBSuperScript:
-
- o You can create your own doors, without being a programmer.
-
- o With PCBSuperScript, you can use a large number of testing methods,
- and react to caller entry in an intelligent manner. You can ask
- questions based on the result of a previous question, execute only
- certain portions of a script, provide default answers to questions,
- provide field formatting instructions, etc...
-
- o PCBSuperScript field entry can require a minimum and maximum number
- of char's to be entered, allow only certain types of data to be
- entered (char or numeric) and automatic formatting of phone number
- type fields.
-
- o PCBSuperScript YOU have direct control over what, and how data is
- written to the log file.
-
- o A PCBSuperScript script can be limited to callers with a specific
- security level, and also require a password to enter it.
-
- o PCBSuperScript only displays what you tell it to; you don't have
- to have the first six lines of anything displayed.
-
- o You can modify the caller security level.
-
- o You can place entries in the caller log.
-
- o You can send a message to the caller, yourself or anyone else, in
- any conference.
-
- o Shell to any DOS program, or perform any DOS command.
-
-
- Unlike most other data acquisition doors (i.e. registration doors),
- PCBSuperScript does not bind you to one method/format of acquiring user
- input, or the purpose for which it's used.
-
- PCBSuperScript can be used for almost anything, but I use it for the
- following purposes on my BBS:
-
- o New caller registration, with immediate security update's (and a
- COMMENT sent to SYSOP).
- o General Q&A of the caller.
- o Accepting software bug reports.
- o Processing on-line orders.
- o Specialized file transfers.
-
-
- Requirements
- -----------------------------------------------------------------------------
-
- PCBSuperScript requires:
-
- o PCBoard version 14.5 or higher.
- o 90-128k free memory, depending on size of script loaded.
-
-
- NOTE: If you are *not* using version 14.5a of PCBoard (the current
- beta release), you will need to SET a few environment variables
- in your BOARD.BAT file. They are:
-
- PCBDRIVE PCBoard's home drive letter
- PCBDIR PCBoard's home directory
- PCBDAT name/location of PCBOARD.DAT
-
-
- Example:
-
- SET PCBDRIVE = J:
- SET PCBDIR = \PCB
- SET PCBDAT = J:\PCB\PCBOARD.DAT
-
-
- NOTE: If you are using a non-standard comm port, you will need to SET
- the environment variable "PCBPORT" in your BOARD.BAT file. The
- format for "PCBPORT" is:
-
- AAAA:I
-
- where
- AAAA Comm port address in HEX.
- I IRQ value.
-
- Example:
-
- SET PCBPORT = 03E8:4
-
-
-
-
- Installing PCBSuperScript
- -----------------------------------------------------------------------------
-
- Installing PCBSuperScript is as easy as copying the file SS.EXE to your
- PCBoard directory. Then for each door that you wish to create, you'll need
- to create the door driver and definition files.
-
- The door driver file is the file that PCBoard uses to execute the door.
- For example, if you wanted to setup a door named "INFO", you would create
- a file named "INFO" (no extension) in your PCBoard directory. The contents
- of this file would look something like the following:
-
- @echo off
- ss j:\pcb\ss\info.def
- exit
-
- This example would load PCBSuperScript with the definition file
- "J:\PCB\INFO.DEF". PCBSuperScript does not require that you supply the
- drive and path to the definition file - I just always include such
- information to keep confusion down to a minimum (my own).
-
- You will then need to use PCBSETUP to add the door to DOOR.LST
- as follows:
-
- ┌───────────────────────────────────────────────────────────────────────┐
- │ USER DOOR │
- │ Filename Password Sec Login SYS SYS Shell Path to DOOR Files │
- │ ══════════ ════════════ ═══ ═════ ════ ════ ═════ ═══════════════════╡
- │ 1) INFO 9 Y Y Y Y J:\PCB\SS │
- └───────────────────────────────────────────────────────────────────────┘
-
- └edit accordingly
- Filename The name of the door.
- Password Optional password for this door.
- Sec Security level needed to open this door.
- Login 'Y' if this is a login door, 'N' otherwise.
- USER SYS ALWAYS set to 'Y' for PCBSuperScript doors.
- DOOR SYS ALWAYS set to 'Y' for PCBSuperScript doors.
- Shell Determines how PCBoard will shell to the door. NOTE: If
- you set this field to 'N', you *must* replace the "exit"
- verb in the door driver file with "board".
- Path Optional path to door files.
-
-
-
- Script Parsing
- -----------------------------------------------------------------------------
-
- The command parsing of PCBSuperScript is different than what most users
- are probably familiar with, but you'll soon discover that it is very easy
- and powerful at the same time.
-
- PCBSuperScript parses the script files one word at a time. A "word" to
- PCBSuperScript is any text separated by a space(s), tab character(s) or
- any text enclosed by matching quotes. All spaces and tabs are removed from
- between words while processing. Therefore, if you are using a parameter
- that contains one or more spaces, you must enclose it in matching quotes
- so that the spaces are not removed.
-
- It is important to understand the usage of quotes in PCBSuperScript.
- Since PCBSuperScript allows "stacking" of text and variables in a script
- line, there must be some way for it to discern variables from literal text.
- Whenever PCBSuperScript encounters a quote (single or double), it will
- search for the next matching quote. The data between the matching quotes
- is then treated as one "word".
-
- While PCBSuperScript is processing a script line, each word is checked
- against the variable table first; if a match is found, the value of the
- variable is accumulated internally. If a match is not found, the word
- itself is accumulated. Remember, text enclosed by matching quotes is
- treated as one word; regardless of the number of spaces it contains. The
- final result is a combination of all variables and literal text in the
- script line.
-
- For example, the following commands will display different results to
- the screen due to the different usage of quotes:
-
- COMMAND: TEXT "Display this data to the screen"
- RESULT: Display this data to the screen
-
- COMMAND: TEXT Display this data to the screen
- RESULT: Displaythisdatatothescreen
-
- As was noted earlier, PCBSuperScript allows "stacking" of text and
- variables in a script line. The following example demonstrates this:
-
- COMMAND: TEXT "Date: " @sysdate@ " Time: " @systime@
- RESULT: Date: 06-17-91 Time: 04:28
-
- COMMAND: TEXT Date: @sysdate@ Time: @systime@
- RESULT: Date:06-17-91Time:04:28
-
- Again, note the usage of quotes, and the results.
-
-
-
- Tutorial
- -----------------------------------------------------------------------------
-
- This section is a tutorial on the basic use of PCBSuperScript. It is
- recommended that all users complete this section, regardless of previous
- experience.
-
- All PCBSuperScript script files are standard ASCII text files. These
- files are created and maintained in much the same manner as your
- AUTOEXEC.BAT and CONFIG.SYS files are. Do NOT use MS Word, WordPerfect or
- other similar word processors to create/maintain script files. A text
- editor will be needed for this purpose (QEdit works nicely).
-
- The following sections instruct you to create, and add text to three
- files: NEWCALL, NEWCALL.MSG and NEWCALL.DEF. These files are also included
- with this ZIP file (in case you do not wish create and enter these files).
- However, you should check these files for directory specific items, and
- change accordingly.
-
- Also note that there are a number of sample scripts for PCBSuperScript
- included ("*.DEF"). They should be printed out and studied at your
- leisure.
-
-
- Step 1: Create the files
- -----------------------------------------------------------------------------
-
- Create the file "NEWCALL" in your PCBoard home directory. Enter the
- following into it (don't include the line numbers, or the <EOF> marker):
-
- 1:ss newcall.def
- 2:exit
- 3:<EOF>
-
- Using PCBSETUP, add a door to DOOR.LST as follows:
-
- ┌───────────────────────────────────────────────────────────────────────┐
- │ USER DOOR │
- │ Filename Password Sec Login SYS SYS Shell Path to DOOR Files │
- │ ══════════ ════════════ ═══ ═════ ════ ════ ═════ ═══════════════════╡
- │ 1) NEWCALL 9 Y Y Y Y J:\PCB\SS │
- └───────────────────────────────────────────────────────────────────────┘
-
- └edit accordingly
-
-
- Create the file "NEWCALL.MSG" in your PCBoard door directory. Enter the
- following into it (don't include the line numbers, or the <EOF> marker):
-
- 1:Welcome to our system, @first@
- 2:<EOF>
-
- Create the file "NEWCALL.DEF" in your PCBoard door directory. This is
- the name of the script file that we will use for this tutorial.
-
-
-
- Step 2: Displaying information to the caller
- -----------------------------------------------------------------------------
-
- The TEXT command is used to display data to the caller. The data
- displayed may contain a variable combination of literal data, field names,
- system variables and environmental variables. The combination of all data
- (the final result) may not exceed 255 char's. PCBoard @X color codes are
- recognized.
-
- The NEWLINE command is used to display one or more blank lines to the
- screen. The maximum number of blank lines that may be displayed is
- "limited" to 65,535.
-
- The INDENT command is used to position the displayed text to a specific
- column.
-
- Add the following lines to "NEWCALL.DEF":
-
- NEWLINE 24
- INDENT 5
- TEXT "---------------------------------------------------------------"
- TEXT " **** QExchange Bulletin Board ****"
- TEXT "---------------------------------------------------------------"
- NEWLINE 2
- TEXT "You are in the new caller login section. After completing"
- TEXT "the questions below, you will be returned to the main bulletin"
- TEXT "board."
- TEXT ""
- TEXT "This is a one-time procedure. Estimated time to complete this"
- TEXT "questionnaire is 2 to 4 minutes."
- TEXT ""
- TEXT " Date: " @sysdate@
- TEXT " Time: " @systime@
- TEXT " Caller Name: " @user@
- TEXT " City, State: " @city@
- TEXT " Security Level: " @security@
- TEXT " Baud Rate: " @bps@
- TEXT " Node: " @node@
- TEXT ""
- TEXT "---------------------------------------------------------------"
- TEXT ""
- INDENT 0
-
-
- Another command that is used to display data to the caller is
- "DISPLAY_FILE". This command will display the contents of a file to the
- screen.
-
- Add the following line to "NEWCALL.DEF":
-
- DISPLAY_FILE J:\PCB\SS\NEWCALL.MSG
-
- └edit accordingly
-
-
-
- Data Entry
- -----------------------------------------------------------------------------
-
- Data entry is accomplished in PCBSuperScript by defining variables, then
- prompting for the user entry. Variables must be defined in the script file
- prior to usage (prompting), and are defined in the following manner:
-
- FIELDS
- name mask type default
- .......
- .......
- name mask type default
- FIELDS
-
- Note the usage of the keyword "FIELDS". This keyword is used to mark the
- beginning and end of a list of variables. Lines between matching "FIELDS"
- keywords, are considered variable descriptor lines. The format for a
- variable descriptor line is:
-
- name The name of the variable. 1 to 20 char's. Case *is*
- significant.
-
- mask The entry mask. The "mask" field is used to determine the
- minimum and maximum entry lengths. A "_" indicates a char
- MUST be entered at this location (a space is allowed). A
- "." indicates optional entry space.
-
- For example: If you wanted to input the user's occupation,
- with at least 5 char's of entry, but no more than 25, then
- the mask would be:
-
- "_____...................."
-
- type The type of the field. 1 char.
- 'C' Character field. Any char can be entered.
- 'N' Numeric field. Digits only.
- 'P' Phone field. Entry in "(...)...-...." only.
- 'L' Logical field. Entry of "YNyn" only.
-
- default The default value of the field (optional). This can be any
- text enclosed by matching quotes, system variables or
- environmental variables (see System Variables).
-
-
- The following FIELDS block defines a commonly required group of
- variables:
-
- FIELDS
- Name ......................... C @user@
- Company ___...................... C
- Addr1 _____.................... C
- Addr2 ......................... C
- CitySt _____.................... C @city@
- Zip _____ N
- Country ___...................... C "USA"
- Phone _ P
- Fax _ P
- FIELDS
-
- Note the usage of "@user@" and "@city@". These are two of the available
- system variables, and are used here to provide a default answer for the
- appropriate fields. The "Country" field uses a literal text default value
- of "USA". Also note that the two "phone" fields (type 'P'), have only one
- "_". Phone entry fields do not use the field "mask" for formatting,
- therefor, it is only used as a place marker (but it must be included).
-
- Now that the variables have been defined, you're ready to accept input
- from the caller. This is accomplished with the PROMPT command, and has the
- following format:
-
- PROMPT prompt_msg variable
-
- where:
- prompt_msg the prompt displayed to the caller
- variable the variable name used to store the caller's
- entry.
-
- Example:
- ;
- ; Field definitions
- ;
- FIELDS
- Name ......................... C @user@
- Company ___...................... C
- Addr1 _____.................... C
- Addr2 ......................... C
- CitySt _____.................... C @city@
- Zip _____ N
- Country ___...................... C "USA"
- Phone _ P
- Fax _ P
- FIELDS
- ;
- ; Field entry
- ;
- PROMPT " Name: " Name
- PROMPT " Company: " Company
- PROMPT " Address line 1: " Addr1
- PROMPT " Address line 2: " Addr2
- PROMPT " City, State: " CitySt
- PROMPT " Zip: " Zip
- PROMPT " Country: " Country
- PROMPT " Phone Number: " Phone
- PROMPT " Fax Number: " Fax
- ;
- ; all done...
- ;
- EXIT
-
-
- The above example also uses two new items: the comment character ";",
- and the "EXIT" command.
-
- The comment character may begin at any position on the line. Script
- lines that are entirely comment lines are not loaded into memory. There are
- no memory or performance penalties for using comments in your scripts.
-
- NOTE: If the comment character needs to be used in a string,
- it should be enclosed between matching quotes.
-
-
- The EXIT command signals the end of processing and is required.
-
-
-
- Logging Data
- -----------------------------------------------------------------------------
-
- The log file is the name of the DOS file where PCBSuperScript will write
- data to. The LOG_DATA statement also defines the name of the log file. If
- the file currently exists, it will be appended to, otherwise, it will be
- created.
-
- Lines between matching "LOG_DATA" keywords, are considered log file
- descriptor lines. The format for a log file descriptor line is a variable
- combination of literal data, field names, system variables and
- environmental variables. The combination of all data (the final result)
- may not exceed 255 char's.
-
- Add the following line to "NEWCALL.DEF":
-
- ;
- ; Field definitions
- ;
- FIELDS
- Name ......................... C @user@
- Company ___...................... C
- Addr1 _____.................... C
- Addr2 ......................... C
- CitySt _____.................... C @city@
- Zip _____ N
- Country ___...................... C USA
- Phone _ P
- Fax _ P
- FIELDS
- ;
- ; Field entry
- ;
- PROMPT " Name: " Name
- PROMPT " Company: " Company
- PROMPT " Address line 1: " Addr1
- PROMPT " Address line 2: " Addr2
- PROMPT " City, State: " CitySt
- PROMPT " Zip: " Zip
- PROMPT " Country: " Country
- PROMPT " Phone Number: " Phone
- PROMPT " Fax Number: " Fax
- ;
- ; append data to log file
- ;
- TEXT "Logging data. Please wait..."
- LOG_DATA J:\PCB\SS\NEWCALL.LOG ;── edit accordingly
- " Name: " Name
- " Company: " Company
- " Address line 1: " Addr1
- " Address line 2: " Addr2
- " City, State: " CitySt
- " Zip: " Zip
- " Country: " Country
- " Phone Number: " Phone
- " Fax Number: " Fax
- " Date/Time: " @sysdate@ @systime@
- " Node/Port/Baud: " @node@ @port@ @bps@
- LOG_DATA
- ;
- ; all done...
- ;
- EXIT
-
-
- The log file result of this example might look something like the
- following:
-
- Name: Joe Smith
- Company: Acme Steel
- Address line 1: 123 Metal Lane
- Address line 2:
- City, State: Iron Ore, PA
- Zip: 12345
- Country: USA
- Phone Number: (123)456-7890
- Fax Number: (000)000-0000
- Date/Time: 12/27/90 09:46:19
- Node/Port/Baud: 2 1 19200
-
-
- This completes the tutorial on the basic use of PCBSuperScript. It is
- recommended that you now study the other *.DEF files included with this
- ZIP file.
-
-
- -----------------------------------------------------------------------------
- Command Reference
- -----------------------------------------------------------------------------
-
- --------------------------------------------------------------------------
- ACCEPT <row> <col> <prompt> <var>
- --------------------------------------------------------------------------
-
- Desc: Get keyboard input from caller, at a specific row and column.
-
- Parms: row Row to start display of "prompt".
- col Column to start display of "prompt".
- prompt Prompt string to display.
- var Variable to store the user input.
-
- Notes: This command may only be used if the caller in is graphics
- mode.
-
- Example: ACCEPT 22 1 "Enter Option " Op
-
-
- --------------------------------------------------------------------------
- ADD <var> <val1> <val2>
- --------------------------------------------------------------------------
-
- Desc: Add "val1" and "val2", then store the result in variable
- "var".
-
- Parms: var Variable to store result in.
- val1 First value to add
- val2 Second value to add
-
- Notes: The result is treated as a 10.2 float value.
-
- Example: ADD Tot Price Tax ;Tot = Price + Tax
- ADD Tot Price 3 ;Tot = Price + 3
-
-
- --------------------------------------------------------------------------
- ADJ_EXPIRE <count>
- --------------------------------------------------------------------------
-
- Desc: Sets the current callers expiration date to todays date plus
- "count" number of days.
-
- Parms: count The number of days to add to todays date.
-
- Notes: "UPDATE_USER_RECORD" *must* be called to update any data to
- the callers record.
-
- Example: ADJ_EXPIRE 15 ;expire date = today + 15 days
- UPDATE_USER_RECORD ;update the user record with new data
-
-
- --------------------------------------------------------------------------
- ANS_ATTR [BRIGHT] <fcolor> [BLINK] <bcolor>
- --------------------------------------------------------------------------
-
- Desc: Defines the color of the user entered data in PROMPT and
- ACCEPT commands.
-
- Parms: BRIGHT Optional modifier to cause the foreground color to
- display as bright.
- fcolor The foreground color to use.
- BLINK Optional modifier to cause the display to blink.
- bcolor The background color to use.
-
- Notes: This command may only be used if the caller in is graphics
- mode. Valid colors are: BLACK, RED, GREEN, YELLOW, BLUE,
- MAGENTA, CYAN and WHITE.
-
- Example: ANS_ATTR BRIGHT WHITE BLACK
-
-
- --------------------------------------------------------------------------
- BEEPS <ON/OFF>
- --------------------------------------------------------------------------
-
- Desc: When the caller has exhausted the entry space of a field, or
- entered invalid data for the field, PCBSuperScript emits a
- "beep" to the caller. By default BEEPS is ON.
-
- Parms: ON Turn beeps on (default).
- OFF Turn beeps off
-
- Notes: None.
-
- Example: BEEPS ON ;turn beeps on
-
-
- --------------------------------------------------------------------------
- CLEARCRT
- --------------------------------------------------------------------------
-
- Desc: Clears the screen.
-
- Parms: None.
-
- Notes: This command may only be used if the caller in is graphics
- mode.
-
- Example: CLEARCRT
-
-
- --------------------------------------------------------------------------
- CLEARLINES <row1> <row2>
- --------------------------------------------------------------------------
-
- Desc: Clear a specified block of rows on the screen.
-
- Parms: row1 First row to clear
- row2 Last row to clear
-
- Notes: This command may only be used if the caller in is graphics
- mode.
-
- Example: CLEARLINES 5 17 ;clear lines 5 - 17
-
-
- --------------------------------------------------------------------------
- CLOSEFILE <lun>
- --------------------------------------------------------------------------
-
- Desc: CLOSEFILE closes the specified 'lun' and flushes data buffers
- associated with it.
-
- Parms: lun This is the Logical Unit Number ("LUN"), and must be
- a number from 0 to 9.
-
- Notes: A LUN that has not been opened may safely be closed.
-
- The macro "@file_stat@" contains the result of the last data
- file operation performed by PCBSuperScript. All data file
- functions load this macro with "*OK*" if no error occurred.
- This macro should be checked after a data file function to
- insure proper script operation. See ORDER.DEF for examples of
- these commands.
-
- Example: OPENFILE 0 J:\PCB\SS\DATA.DAT
- READFILE 0 DatFmt
- CLOSEFILE 0
-
-
- --------------------------------------------------------------------------
- COLOR [BRIGHT] <fcolor> [BLINK] <bcolor>
- --------------------------------------------------------------------------
-
- Desc: Sets the display color.
-
- Parms: BRIGHT Optional modifier to cause the foreground color to
- display as bright.
- fcolor The foreground color to use.
- BLINK Optional modifier to cause the display to blink.
- bcolor The background color to use.
-
- Notes: This command may only be used if the caller in is graphics
- mode. Valid colors are: BLACK, RED, GREEN, YELLOW, BLUE,
- MAGENTA, CYAN and WHITE.
-
- Example: COLOR BRIGHT CYAN BLACK
-
-
- --------------------------------------------------------------------------
- DECREASE <dec> <min>
- --------------------------------------------------------------------------
-
- Desc: Decrease caller security level by 'dec', but do not allow to
- be less than 'min'.
-
- Parms: dec Decrement amount.
- min Minimum allowed value of security level
-
- Notes: A modified security level is not written back to the user file
- until the UPDATE_USER_RECORD command is executed.
-
- Example: DECREASE 1 10
-
-
- --------------------------------------------------------------------------
- DEC <var>
- --------------------------------------------------------------------------
-
- Desc: Decrement the specified variable by 1.
-
- Parms: var The variable to decrement.
-
- Notes: none
-
- Example: DEC Row ;decrement variable "Row" by 1.
-
-
- --------------------------------------------------------------------------
- DELAY <x>
- --------------------------------------------------------------------------
-
- Desc: Pause script execution for "x" seconds.
-
- Parms: x The number of seconds to pause.
-
- Notes: none
-
- Example: DELAY 5 ;pause script for 5 seconds
-
-
- --------------------------------------------------------------------------
- DISPLAY <row> <col> <..data..>
- --------------------------------------------------------------------------
-
- Desc: Display the specified data at a specified row and column.
-
- Parms: row Row to start display of "..data..".
- col Column to start display of "..data".
- ..data.. The data to display.
-
- Notes: This command may only be used if the caller in is graphics
- mode.
-
- Example: DISPLAY 5 15 "This is your name: " @user@
-
-
- --------------------------------------------------------------------------
- DISPLAYC <row> <..data..>
- --------------------------------------------------------------------------
-
- Desc: Display the specified data centered on a specified row.
-
- Parms: row Row to start display of "..data..".
- ..data.. The data to display.
-
- Notes: This command may only be used if the caller in is graphics
- mode.
-
- Example: DISPLAYC 5 "This is some centered data"
-
-
- --------------------------------------------------------------------------
- DIV <var> <val1> <val2>
- --------------------------------------------------------------------------
-
- Desc: Divide "val1" by "val2", then store the result in variable
- "result_var".
-
- Parms: var Variable to store result in.
- val1 Dividend
- val2 Divisor
-
- Notes: The result is treated as a 10.2 float value.
-
- Example: DIV Temp Tot / Qty ;Temp = Tot / Qty
- DIV Tot Price 3 ;Tot = Price / 3
-
-
- --------------------------------------------------------------------------
- ESET <evar> <val>
- --------------------------------------------------------------------------
-
- Desc: Set's the environment variable "evar" to "val".
-
- Parms: evar The name of the environment variable to set.
-
- Notes: none
-
- Example: ESET DSZLOG "J:\PCB\DSZLOG" @node@ ".LOG"
-
-
- --------------------------------------------------------------------------
- FIELDS
- <name> <mask> <type> <default>
- .......
- FIELDS
- --------------------------------------------------------------------------
-
- Desc: Defines variables to be used in the script.
-
- Parms: name The name of the variable. 1 to 20 char's. Case *is*
- significant.
-
- mask The entry mask. The "mask" field is used to
- determine the minimum and maximum entry lengths. A
- "_" indicates a char MUST be entered at this
- location (a space is allowed). A "." indicates
- optional entry space.
-
- For example: If you wanted to input the user's
- occupation, with at least 5 char's of entry, but no
- more than 25, then the mask would be:
-
- "_____...................."
-
-
- type The type of the field. 1 char.
- 'C' Character field. Any char can be entered.
- 'N' Numeric field. Digits only.
- 'P' Phone field. Entry in "(...)...-...." only.
- 'L' Logical field. Entry of "YNyn" only.
-
- default The default value of the field (optional). This can
- be any text enclosed by matching quotes, system
- variables or environmental variables (see System
- Variables).
-
- Notes: none
-
- Example: FIELDS
- Name ......................... C @user@
- Company ___...................... C
- Addr1 _____.................... C
- Addr2 ......................... C
- CitySt _____.................... C @city@
- Zip _____ N
- Country ___...................... C "USA"
- Phone _ P
- Fax _ P
- FIELDS
-
-
- --------------------------------------------------------------------------
- FLUSH_KB
- --------------------------------------------------------------------------
-
- Desc: Discard any characters remaining in the keyboard buffer.
-
- Parms: None.
-
- Notes: none.
-
- Example: FLUSH_KB
-
-
- --------------------------------------------------------------------------
- FORCE_ENTER
- --------------------------------------------------------------------------
-
- Desc: Displays a "Press Enter to continue..." prompt, and waits for
- the caller to press ENTER.
-
- Parms: none.
-
- Notes: none.
-
- Example: FORCE_ENTER
-
-
- --------------------------------------------------------------------------
- FORMAT <name>
- <var>
- ...
- FORMAT
- --------------------------------------------------------------------------
-
- Desc: Defines a format to use with READFILE or WRITEFILE.
-
- Parms: var Variable to load/write with READFILE/WRITEFILE.
-
- Notes: none.
-
- Example: FIELDS
- Name ......................... C @user@
- Company ___...................... C
- Addr1 _____.................... C
- Addr2 ......................... C
- CitySt _____.................... C @city@
- Zip _____ N
- Country ___...................... C "USA"
- Phone _ P
- Fax _ P
- FIELDS
- ;
- FORMAT DatFmt
- Name
- Company
- Addr1
- Addr2
- CitySt
- Zip
- Country
- Phone
- Fax
- FORMAT
-
-
- --------------------------------------------------------------------------
- GETWORD <var>
- --------------------------------------------------------------------------
-
- Desc: Gets the next word from "string" (referred to by the previous
- PARSE command). If the end of line is reached, "var" will be
- set to the value "*EOL*".
-
- Parms: var variable to store result in.
-
- Notes: The commands "PARSE" and "GETWORD" allow scripts to parse data
- fields or environment variables into individual words. To use
- these commands, "PARSE" *MUST* be called FIRST to setup
- subsequent calls to "GETWORD".
-
- Example: ......
- ......
- PARSE @%PCBDOOR
- GETWORD Option
- IF Option == "*EOL*"
- GOTO BadCmd
- ENDIF
- GETWORD FileName
- IF FileName == "*EOL*"
- GOTO BadCmd
- ENDIF
- ......
- ......
-
-
- --------------------------------------------------------------------------
- GOTO <label> [TOP]
- --------------------------------------------------------------------------
-
- Desc: Transfer control to the specified "label". The "label"
- referenced by the GOTO command must exist in the script file.
- Unlike DOS BAT files, the label that is referenced by the GOTO
- command may be a variable.
-
- Parms: label the label to transfer execution to
- TOP Optional suffix (see Notes).
-
- Notes: When the GOTO command is executed, searching for the label
- begins at the current location in the script file, progressing
- to the end of file. If the end of file is encountered before
- the label is found, searching is "wrapped" around to the top
- of the script file and continues in a downward progression. If
- the label is not found by the time it reaches the original
- search position in the script file, the label is declared
- undefined and execution of the script halts.
-
- Keeping in mind the process of searching for a label, it may
- be advantageous to instruct the GOTO command to start at the
- top of the script in the search if the label is known to be
- above the current location in the script file. This is
- accomplished with the TOP suffix.
-
- Example: ...
- ...
- :There
- ....
- ....
- ....
- GOTO There TOP
- ...
- ...
-
-
- --------------------------------------------------------------------------
- GOTORC <row> <col>
- --------------------------------------------------------------------------
-
- Desc: Positions the cursor to "row" and "col".
-
- Parms: row 1 based row value
- col 1 based column value
-
- Notes: This command may only be used if the caller in is graphics
- mode.
-
- Example: GOTORC 1 1
-
-
- --------------------------------------------------------------------------
- IF <val1> [<test> <val2>]
- <stmnts>
- [ELSE
- <stmnts>]
- ENDIF
- --------------------------------------------------------------------------
-
- Desc: Allow selective execution of script statements based on
- variable values. The IF/ELSE/ENDIF clause is used as in most
- any other language. Note that the ENDIF statement MUST be
- used.
-
- If only one field is used in the IF statement, it is simply
- tested for NULL. For example:
-
- IF Name
- ...
- ENDIF
-
- Is the same as:
-
- IF Name != ""
- ...
- ENDIF
-
- If the ELSE statement is included, statements between it and
- the matching ENDIF statement are executed if the previous IF
- statement fails.
-
- Parms: val1 The first of two values to test.
- test The test to perform. Valid test operators are:
- == equal
- != not equal
- > greater than
- >= greater than, or equal
- < less than
- <= less than, or equal
- ? if val1 is in val2
- !? if val1 is not in val2
-
- val2 The second of two values to test.
- stmnts Any number of valid statements.
-
- Notes: The IF/ELSE/ENDIF clause may be nested to any level.
-
-
- --------------------------------------------------------------------------
- INCREASE <inc> <max>
- --------------------------------------------------------------------------
-
- Desc: Increase sec level by 'inc', but do not allow to be more than
- 'max'.
-
- Parms: inc increment amount.
- max maximum allowed value of security level
-
- Notes: A modified security level is not written back to the user file
- until the UPDATE_USER_RECORD command is executed.
-
- Example: INCREASE 1 10
-
-
- --------------------------------------------------------------------------
- INC <var>
- --------------------------------------------------------------------------
-
- Desc: Increment the specified variable by 1.
-
- Parms: var the variable to decrement.
-
- Notes: none
-
- Example: INC Row ;increment variable "Row" by 1.
-
-
- --------------------------------------------------------------------------
- INCLUDE <file>
- --------------------------------------------------------------------------
-
- Desc: Reads a specified file into the current script, at the
- location of the "INCLUDE" command.
-
- Parms: file The file name to include.
-
- Notes: "INCLUDE" statements may be nested to a level of 10.
-
- Example: INCLUDE "J:\PCB\SS\DEF.INC"
-
-
- --------------------------------------------------------------------------
- LCASE <var>
- --------------------------------------------------------------------------
-
- Desc: Converts all characters in "var" to lower case.
-
- Parms: var The variable to modify.
-
- Notes: none
-
- Example: LCASE Occupation
-
-
- --------------------------------------------------------------------------
- LOG_DATA <file>
- <..data..>
- ...
- LOG_DATA
- --------------------------------------------------------------------------
-
- Desc: Define what and where PCBSuperScript will log data to. If the
- file currently exists, it will be appended to, otherwise it
- will be created.
-
- Parms: file The log file name.
- ..data.. The data to write to the log file.
-
- Notes: Lines between matching "LOG_DATA" keywords, are considered log
- file descriptor lines. The format for a log file descriptor
- line is a variable combination of literal data, field names,
- system variables and environmental variables. The combination
- of all data (the final result) may not exceed 255 char's.
-
- Example: LOG_DATA J:\PCB\SS\NEWCALL.LOG
- " Name: " Name
- " Company: " Company
- " Address line 1: " Addr1
- " Address line 2: " Addr2
- " City, State: " CitySt
- " Zip: " Zip
- " Country: " Country
- " Phone Number: " Phone
- " Fax Number: " Fax
- " Date/Time: " @sysdate@ @systime@
- " Node/Port/Baud: " @node@ @port@ @bps@
- LOG_DATA
-
-
- --------------------------------------------------------------------------
- LOGMSG <msg>
- --------------------------------------------------------------------------
-
- Desc: Writes "msg" to the caller log file for this node.
-
- Parms: msg The message to write.
-
- Notes: none
-
- Example: LOGMSG @user@ " accessed this door"
-
-
- --------------------------------------------------------------------------
- MAX_ATTR [BRIGHT] <fcolor> [BLINK] <bcolor>
- --------------------------------------------------------------------------
-
- Desc: Defines the color of the "maximum" field character in PROMPT
- and ACCEPT commands.
-
- Parms: BRIGHT optional modifier to cause the foreground color to
- display as bright.
- fcolor the foreground color to use.
- BLINK optional modifier to cause the display to blink.
- bcolor the background color to use.
-
- Notes: This command may only be used if the caller in is graphics
- mode. Valid colors are: BLACK, RED, GREEN, YELLOW, BLUE,
- MAGENTA, CYAN and WHITE.
-
- Example: MAX_ATTR BLUE BLACK
-
-
- --------------------------------------------------------------------------
- MAX_CHAR <char>
- --------------------------------------------------------------------------
-
- Desc: Defines the character used to signify the maximum number of
- characters to be entered in PROMPT and ACCEPT commands. The
- default is a period ('.').
-
- Parms: char The new character to use.
-
- Notes: none
-
- Example: MAX_CHAR "\xFA"
-
-
- --------------------------------------------------------------------------
- MIN_ATTR [BRIGHT] <fcolor> [BLINK] <bcolor>
- --------------------------------------------------------------------------
-
- Desc: Defines the color of the "minimum" field character in PROMPT
- and ACCEPT commands.
-
- Parms: BRIGHT optional modifier to cause the foreground color to
- display as bright.
- fcolor the foreground color to use.
- BLINK optional modifier to cause the display to blink.
- bcolor the background color to use.
-
- Notes: This command may only be used if the caller in is graphics
- mode. Valid colors are: BLACK, RED, GREEN, YELLOW, BLUE,
- MAGENTA, CYAN and WHITE.
-
- Example: MIN_ATTR RED BLACK
-
-
- --------------------------------------------------------------------------
- MIN_CHAR <char>
- --------------------------------------------------------------------------
-
- Desc: Defines the character used to signify the minimum number of
- characters to be entered in PROMPT and ACCEPT commands. The
- default is an underscore ('_').
-
- Parms: char The new character to use.
-
- Notes: none
-
- Example: MIN_CHAR "\xC4"
-
-
- --------------------------------------------------------------------------
- MSG
- <to>
- <from>
- <subject>
- <security>
- <conf>
- ...message data...
- ...
- MSG
- --------------------------------------------------------------------------
-
- Desc: The "MSG" command adds a message to a specified message base.
-
- Parms: to The name of the person this message is being sent
- to. This can be a literal value, a system variable
- (i.e. @user@) or a variable currently defined in the
- script.
-
- from The name of the person this message is from. This
- can be a literal value, a system variable (i.e.
- @user@) or a variable currently defined in the
- script.
-
- subject The subject of this message. This can be a literal
- value or a variable currently defined in the script.
-
- security The security of this message. Valid choices are
- "Private", Comment" and "Public" (case is not
- significant). This can be a literal value or a
- variable currently defined in the script.
-
- conf The conference to place the message in. This can be
- a literal value or a variable currently defined in
- the script. Note that the spelling *and* case of the
- conference name *MUST* be exact.
-
- msg data The text body of the message. Up to 99 lines will be
- processed. This can be any combination of literal
- data, system variables and currently defined script
- variables.
-
- Example: ;
- ;send comment to sysop
- ;
- MSG
- SYSOP ;to
- SYSOP ;from
- "New User Called" ;subj
- Comment ;sec
- "Main Board" ;conf
- "A new user named " @user@ " has called the system."
- "The date and time was " @sysdate@ " : " @systime@ "."
- "They are from " @city@ "
- "Their phone is " Phone
- "Their occupation is " Occup "
- "They are " Age " years old."
- ""
- "Node: " @node@ " Baud Rate: " @bps@
- MSG
- ;
- ;send private msg to the new caller
- ;
- MSG
- @user@ ;to
- SYSOP ;from
- "Welcome!" ;subj
- Private ;sec
- "Main Board" ;conf
- "Welcome to our BBS! This is your first message here!"
- MSG
-
-
- --------------------------------------------------------------------------
- MUL <var> <val1> <val2>
- --------------------------------------------------------------------------
-
- Desc: Multiply "val1" and "val2", then store the result in variable
- "var".
-
- Parms: var variable to store result in.
- val1 value 1 to multiply
- val2 value 2 to multiply
-
- Notes: The result is treated as a 10.2 float value.
-
- Example: MUL Tot Qty Price ;Tot = Qty * Price
- MUL Tot Price 3 ;Tot = Price * 3
-
-
- --------------------------------------------------------------------------
- NULL_ENTRY <label>
- --------------------------------------------------------------------------
-
- Desc: If the last performed PROMPT entry resulted in a null entry,
- processing will branch to "label".
-
- Parms: label the label to transfer execution to
-
- Notes: none
-
- Example: PROMPT " Name: " Name
- NULL_ENTRY AbortJob
-
-
- --------------------------------------------------------------------------
- OPENFILE <lun> <file>
- --------------------------------------------------------------------------
-
- Desc: OPENFILE prepares a script for data file access. Up to 10
- files may be open at the same time, using Logical Unit Numbers
- (LUN's) from 0 to 9. If the specified LUN is already in use by
- a previous call to OPENFILE, it is first closed.
-
- Parms: lun This is the Logical Unit Number, and must be a
- number from 0 to 9.
- file The name of the file.
-
- Notes: If the LUN is already open, it is first closed.
-
- The macro "@file_stat@" contains the result of the last data
- file operation performed by PCBSuperScript. All data file
- functions load this macro with "*OK*" if no error occurred.
- This macro should be checked after a data file function to
- insure proper script operation. See ORDER.DEF for examples of
- these commands.
-
- Also see "FORMAT".
-
- Example: OPENFILE 0 J:\PCB\SS\DATA.DAT
- READFILE 0 DatFmt
- CLOSEFILE 0
-
-
- --------------------------------------------------------------------------
- PARSE <string>
- --------------------------------------------------------------------------
-
- Desc: Prepares "string" for call to the command GETWORD.
-
- Parms: string The string to parse
-
- Notes: The commands "PARSE" and "GETWORD" allow scripts to parse data
- fields or environment variables into individual words. To use
- these commands, "PARSE" *MUST* be called FIRST to setup
- subsequent calls to "GETWORD".
-
- Example: ......
- ......
- PARSE @%PCBDOOR
- GETWORD Option
- IF Option == "*EOL*"
- GOTO BadCmd
- ENDIF
- GETWORD FileName
- IF FileName == "*EOL*"
- GOTO BadCmd
- ENDIF
- ......
- ......
-
-
- --------------------------------------------------------------------------
- PROMPT <prompt> <var>
- --------------------------------------------------------------------------
-
- Desc: Get keyboard input from caller.
-
- Parms: prompt The prompt displayed to the caller.
- var The variable name used to store the caller's entry.
-
- Notes: none.
-
- Example: PROMPT " Name: " Name
-
-
- --------------------------------------------------------------------------
- RANDOM_STR <count> <var>
- --------------------------------------------------------------------------
-
- Desc: Generate a string of "count" characters, and store the
- result in variable "string"
-
- Parms: count The number of random characters to generate. If
- this value is 0, the generated string will be
- equal to the size of the variable "string".
- string Variable to store the result in.
-
- Notes: The generated string will contain alpha numeric characters
- only.
-
- Example: RANDOM_STR 0 random_str
-
-
- --------------------------------------------------------------------------
- READFILE <lun> <format> [key]
- --------------------------------------------------------------------------
-
- Desc: READFILE reads a data record from the file specified by 'lun',
- into the variables contained in 'format'.
-
- Parms: lun This is the Logical Unit Number, and must be a
- number from 0 to 9.
- format The name of the FORMAT for this file.
- key The optional key value to use for reads to this
- file.
-
- Notes: If a 'key' is supplied, the first field of each record in the
- data file is compared to the specified 'key'. If the 'key' is
- found, the record is read into memory. If it is not found, the
- macro "@file_stat@" is set to the value "*KNF*" (Key Not
- Found).
-
- If a 'key' is not specified, the next sequential record is
- read into memory. If the end of file is reached, the macro
- "@file_stat@" is set to the value "*EOF*" (End Of File).
-
- The macro "@file_stat@" contains the result of the last data
- file operation performed by PCBSuperScript. All data file
- functions load this macro with "*OK*" if no error occurred.
- This macro should be checked after a data file function to
- insure proper script operation. See ORDER.DEF for examples of
- these commands.
-
- Also see "FORMAT".
-
- Example: OPENFILE 0 J:\PCB\SS\DATA.DAT
- READFILE 0 DatFmt
- CLOSEFILE 0
-
-
- --------------------------------------------------------------------------
- REPEAT <row> <col> <char> <cnt>
- --------------------------------------------------------------------------
-
- Desc: Display a specified character a specified number of times, at
- a specified row and col.
-
- Parms: row row to start display of "prompt".
- col column to start display of "prompt".
- char The character to display
- cnt The number of characters to display
-
- Notes: This command may only be used if the caller in is graphics
- mode.
-
- Example: REPEAT 5 15 "─" 30
-
-
- --------------------------------------------------------------------------
- SEC_LOOKUP <file>
- --------------------------------------------------------------------------
-
- Desc: Searches the specified file for the user name. If it is found,
- the security level specified in the look-up file is used. This
- could be used in a new callers script, with the names of
- friends (or customers, or etc..) in the look-up file. Note
- that a modified security level is not written back to the user
- file until the UPDATE_USER_RECORD command is executed.
-
- The format of the look-up file is as follows:
-
- name, level
-
- Parms: file The file name to search.
-
- Notes: A modified security level is not written back to the user file
- until the UPDATE_USER_RECORD command is executed.
-
- Example: look-up file contents:
-
- ABDUL RASHEEDI, 50
- RICHARD MORTON, 50
- SHELDON GIBBS, 50
- CRAIG FILLION, 50
- MIKE SAUNDERS, 50
-
- These people would be given a security level of 50.
-
-
- --------------------------------------------------------------------------
- SEC_TABLE
- <val1> <val2>
- [<val1> <val2>]
- ...
- SEC_TABLE
- --------------------------------------------------------------------------
-
- Desc: Change one specific level to another level. Any number of
- levels may be tested. When a match is made, the table is
- exited. Note that a modified security level is not written
- back to the user file until the UPDATE_USER_RECORD command is
- executed.
-
- Parms: val1 Test security level
- val2 New security level, if current = val1
-
- Notes: A modified security level is not written back to the user file
- until the UPDATE_USER_RECORD command is executed.
-
- Example: SEC_TABLE ;Security Table Start
- 9 10 ; users at sec level 9 goto 10
- 10 20 ; users at sec level 10 goto 20
- 20 30 ; users at sec level 20 goto 30
- SEC_TABLE ;Security Table End
-
-
- --------------------------------------------------------------------------
- SET <var> <val>
- --------------------------------------------------------------------------
-
- Desc: Initialize (or modify) the current value of a variable. The
- "val" may contain a variable combination of literal data,
- field names, system variables and environmental variables. The
- combination of all data (the final result) may not exceed 255
- char's.
-
- Parms: var The variable to modify.
- val The value to store into "var".
-
- Notes: none
-
- Example: SET Row 1
-
-
- --------------------------------------------------------------------------
- SHELL <str>
- --------------------------------------------------------------------------
-
- Desc: Shells to DOS and performs the command "str". The command may
- be any combination of literal data, system variables and
- currently defined script variables.
-
- Parms: str The DOS command to execute
-
- Notes: The macro "@shell_stat@" is loaded with the ERRORLEVEL of the
- SHELL command on return.
-
- Example: SET DszCmd "j:\pcb\DSZ.com port " @port@
- SET DszCmd DszCmd " ha bo z rz -mrr " Directory
- SHELL DszCmd
-
-
- --------------------------------------------------------------------------
- SUB <var> <val1> <val2>
- --------------------------------------------------------------------------
-
- Desc: Subtract "val2" from "val1", then store the result in variable
- "var".
-
- Parms: var variable to store result in.
- val1 Value to be subtracted from.
- val2 Value to subtract.
-
- Notes: The result is treated as a 10.2 float value.
-
- Example: SUB Temp Price Tax ;Temp = Price - Tax
- SUB Tot Price 3 ;Tot = Price - 3
-
-
- --------------------------------------------------------------------------
- SWITCH <field>
- CASE [<val>|<field>]
- <stmnts>
- BREAK
- [CASE <val>|<field>
- <stmnts>
- BREAK]
- SWITCH END
- --------------------------------------------------------------------------
-
- Desc: The SWITCH/CASE/BREAK clause allows processing based on a
- selected number of values, and is most often used in menu
- processing. If a variable name is not provided with the CASE
- statement, it is used as the default CASE. Note that the
- default CASE *must* be the last CASE statement in the SWITCH
- clause.
-
- Parms: Variable
-
- Notes: none
-
- Example: FIELDS
- Sel _ C
- FIELDS
- ;
- :SelMenu
- TEXT "------------------------------------------------"
- TEXT " Order Menu"
- TEXT "------------------------------------------------"
- TEXT " 1. XT 9. Exit"
- TEXT " 2. 286"
- TEXT " 3. 386"
- TEXT " 4. 486"
- TEXT ""
- PROMPT "Selection: " Sel
- SWITCH Sel
- CASE "1"
- GOTO Sel1
- BREAK
- CASE "2"
- GOTO Sel2
- BREAK
- CASE "3"
- GOTO Sel3
- BREAK
- CASE "4"
- GOTO Sel4
- BREAK
- CASE "9"
- GOTO EndJob
- BREAK
- CASE
- TEXT " Invalid Selection. Please try again."
- BREAK
- SWITCH END
- GOTO SelMenu
-
- :Sel1
- TEXT "You entered 1"
- GOTO SelMenu TOP
- :Sel2
- TEXT "You entered 2"
- GOTO SelMenu TOP
- :Sel3
- TEXT "You entered 3"
- GOTO SelMenu TOP
- :Sel4
- TEXT "You entered 4"
- GOTO SelMenu TOP
-
- :EndJob
- TEXT "You entered 9"
- EXIT
-
-
-
- --------------------------------------------------------------------------
- UCASE <var>
- --------------------------------------------------------------------------
-
- Desc: Converts all characters in "var" to upper case.
-
- Parms: var The variable to modify.
-
- Notes: none
-
- Example: UCASE Occupation
-
-
- --------------------------------------------------------------------------
- UPDATE_USER_RECORD
- --------------------------------------------------------------------------
-
- Desc: Update the user record with new security level. If this
- command is not executed, the user record is *not* updated.
-
- Parms: none
-
- Notes: none
-
- Example: INCREASE 1 10
- UPDATE_USER_RECORD
-
-
- --------------------------------------------------------------------------
- WRITEFILE <lun> <format>
- --------------------------------------------------------------------------
-
- Desc: Write a data record to the file specified by 'lun', using the
- variables contained in 'format'. The record is written using
- the first field in 'format' as a key.
-
- Parms: lun This is the Logical Unit Number, and must be a
- number from 0 to 9.
- format The name of the FORMAT for this file.
-
- Notes: If the key currently exist in the data file, it will be
- updated with the new record (from memory). If it does not
- exist, it will be added to the data file.
-
- The macro "@file_stat@" contains the result of the last data
- file operation performed by PCBSuperScript. All data file
- functions load this macro with "*OK*" if no error occurred.
- This macro should be checked after a data file function to
- insure proper script operation. See ORDER.DEF for examples of
- these commands.
-
- Example: OPENFILE 0 J:\PCB\SS\DATA.DAT
- READFILE 0 DatFmt
- SET UFlag 1
- WRITEFILE 0 DatFmt
- CLOSEFILE 0
-
-
- PCBoard Macros and Environmental Variables
- -----------------------------------------------------------------------------
-
- The following PCBoard Macros are available:
-
- Caller Information
- ------------------
- @bps@ Connect Speed
- @city@ City
- @comment1@ Comment line 1
- @comment2@ Comment line 2
- @confnum@ Current Conference Number
- @dataphone@ Business/Data Phone
- @daybytes@ Daily D/L Bytes
- @dlbytes@ Total D/L Bytes
- @dlfiles@ Total D/L Files
- @expertmode@ Expert mode
- @expdate@ Expiration Date
- @file_stat@ Status of last PCBSuperScript file command
- @first@ First Name (first letter capitalized)
- @firstu@ First Name (all caps)
- @graphics@ 0 = not in graphics mode, 1 = in graphics mode
- @homephone@ Home/Voice Phone
- @lastdateon@ Last Date On
- @lasttimeon@ Last Time On
- @minleft@ Minutes Left
- @msgleft@ Number of Messages Written
- @msgread@ Number of Messages Read
- @numtimeson@ Number of Times On
- @pagelen@ Page length setting
- @password@ User password
- @port@ Port id
- @proltr@ Default Protocol Letter
- @security@ Security Level
- @shell_stat@ Status of last PCBSuperScript shell command
- @timelimit@ Time Limit
- @timeused@ Time Used
- @totaltime@ Total Time Used so far Today
- @upbytes@ Total U/L Bytes
- @upfiles@ Total U/L Files
- @user@ Full Name (all caps)
-
- System Information
- ------------------
- @boardname@ Name of the BBS you are on
- @event@ Event Time
- @node@ Node Number
- @sysdate@ Current Date
- @systime@ Current Time
- @ss_version@ PCBSuperScript version number
-
-
- Display Controls
- ----------------
- @automore@ treats "more?" prompts in a file like @pause@
-
- @beep@ sends a CTRL-G (ascii BELL character) to the
- caller but is not heard on the local machine
- unless the Caller Alarm is turned on
-
- @cls@ clear the entire screen
-
- @clreol@ clear from the cursor to the end of the line
-
- @more@ cause a "more?" prompt to be displayed
-
- @pause@ displays a "more?" prompt with a 10 second auto
- return if the caller doesn't answer it first
-
- @poff@ Turns Prompts OFF (disables "more?" prompt)
-
- @pon@ Turns Prompts ON (enables "more?" prompt)
-
- @qoff@ disables CTRL-X/CTRL-K checking (display abort)
-
- @qon@ enables CTRL-X/CTRL-K checking (display abort)
-
- @wait@ display a "press enter to continue" prompt
-
-
-
- Environmental variables are variables that are currently defined in your
- DOS environment. Environmental variables are accessed in the following
- manner:
-
- @%name Access environmental variable "name".
-
-
- Whenever a PCBoard Macro or Environmental variable is referenced in a
- script, the current value of the variable is substituted for the variable
- name.
-
-
-
- Command Summary List
- -----------------------------------------------------------------------------
-
- ACCEPT Accept user input from a specific row/col.
- ADD Add two values together.
- ANS_ATTR Set attribute of the user "answer" text.
- BEEPS Turn beeps on/off.
- BREAK End of CASE statement.
- CLEARCRT Clear screen of user.
- CLEARLINES Clear lines on the screen.
- CLOSEFILE Close data file.
- COLOR Set display color.
- DEC Decrement a variable by 1.
- DECREASE Decrease security level.
- DELAY Pause script execution
- DISPLAY Display text at row/col.
- DISPLAYC Display centered text at row.
- DISPLAY_FILE Display the contents of a text file.
- DIV Divide two values.
- ESET Set environmental variable.
- EXIT Quit script and return to PCBoard.
- FIELDS Define data entry fields.
- FLUSH_KB Clear any keystrokes buffered at the keyboard.
- FORCE_ENTER Force user to press enter to continue.
- FORMAT Define format for file operations.
- GETWORD Get next word from string.
- GOTO Branch script execution to new label.
- GOTORC Position cursor to row, col.
- IF/ELSE/ENDIF Decision processing.
- INC Increment a variable by 1.
- INCLUDE Include file at current script position.
- INCREASE Increase security level.
- INDENT Indent display area.
- LCASE Set data field to all lower case.
- LOGMSG Write msg to caller log file.
- LOG_DATA Write data to log file name and with format
- MAX_ATTR Set attribute of the max char in prompts.
- MAX_CHAR Set the max char used in prompts.
- MIN_ATTR Set attribute of the min char in prompts.
- MIN_CHAR Set the min char used in prompts.
- MSG Enter message into message base.
- MUL Multiply two values.
- NEWLINE Print a blank line to the screen.
- NULL_ENTRY Branch if previous prompt entry was null.
- OPENFILE Open data file.
- PARSE Setup string for GETWORD parsing.
- PROMPT Formatted user input.
- READFILE Read data from input file, into format.
- REPEAT Repeat a char 'x' times to the screen.
- SEC_LOOKUP Modify security level based on file lookup.
- SEC_TABLE Modify security level based on current value.
- SET Assign new value to variable.
- SHELL Perform DOS shell.
- SUB Subtract two values.
- SWITCH/CASE/ENDCASE Decision processing.
- TEXT Display text to the user screen.
- UCASE Set data field to all upper case.
- UPDATE_USER_RECORD Update PCBoard USER file with new info.
- WRITEFILE Write data to input file, from format.
-
-
-