Script Questionnaires

Script Questionnaires

Script questionnaires provide a method which you can ask the user questions and record their responses to a text file.

Creating

There are two types of script questionnaires you can create. You can use the regular questionnaire type which is a text file with a question on each line. The second type you can create is a PPE file. To create a PPE file, you need to have purchased the optional PPL (PCBoard Programming Language) Compliler.
Any PCBoard v15.0 system can run a PPE file even if the owner of the system did not buy the compiler. To create the PPE files though, you will need the compiler.

Scripts are defined for the conference in the SCRIPT.LST file. This file contains the location of the script file and where the answers for the script will be stored. When you edit the SCRIPT.LST by pressing 2, you should see a screen which resembles the following:

Conference Name  (#0)       : Main Board

      SCRIPT Questionnaire Files      SCRIPT Answer Files
      --------------------------      -------------------
1)

The first field specifies the location of the script questionnaire. The second field specifies the location where the response file will be stored. PCBoard determines if the file is a standard questionnaire or a PPE file based on the filename extension you specify. If the filename of the questionnaire ends with PPE, the questionnaire will be treated as a PPE. Otherwise, the file will be treated as a standard questionnaire.

Standard Questionnaires

Standard questionnaires are very easy to setup because the questionnaire itself is a text file. Questions are asked one line at a time and the user is given the ability to respond to each question with a 60 character response. There is no method provided to check the response of the user. The question itself may be up to 79 characters in length.

The easiest way to load the script questionnaire file is to press F2 when you are highlighting the script to edit while in the SCRIPT.LST editor. PCBSetup will use your text editor to load the script questionnaire.

The first five lines of your questionnaire file is called the script header. You can use these five lines to give your users a brief overview of the questionnaire. After PCBoard displays the header to the user, they are asked if they wish to continue to answer the script. If they choose not to respond to your questionnaire, they will be returned back to the system. If they choose to respond, PCBoard will continue.

Anything after line five in your questionnaire file is considered a question. Each line is a question. The following is a simple example of a questionnaire:

.----------------------------------------------------
This questionnaire will ask for your name
-----------------------------------------------------
Enter your first name?
Enter your last name?

If a user will executes this script then they will see the following:

.----------------------------------------------------
This questionnaire will ask for your name
-----------------------------------------------------

Complete the Questionnaire (Enter)=no? (y)

Enter your first name?
? (Jim                                                         )

Enter your last name?
? (Smith                                                       )

As you can see, every line after the fifth line is considered as a question. If you want to only display text and not ask a question, you would begin the line to display with a semi-colon. This is referred to as a comment line.

If you wish, you can use comment lines to ask questions which use more than one line. Look at the following questionnaire file:

.----------------------------------------------------
We have several items available for sale.  From
hardware to software, we have products that fit your
needs and wants.  If we don't have it, just ask!
-----------------------------------------------------
;We have the following products available for sale:
;
; 1.  Complete 80486 system with SVGA video system
; 2.  Whiz-bang hard-drive
; 3.  Plain paper bag software
Which item would you like to order?

When the user executes this script, they will see the following display:

.----------------------------------------------------
We have several items available for sale.  From
hardware to software, we have products that fit your
needs and wants.  If we don't have it, just ask!
-----------------------------------------------------

Complete the Questionnaire (Enter)=no? (y)

We have the following products available for sale:

 1.  Complete 80486 system with SVGA video system
 2.  Whiz-bang hard-drive
 3.  Plain paper bag software

Which item would you like to order?
? (3                                                           )

Notice how those lines that were prefixed with a semicolon were only displayed on the screen. Only after the items for sale were listed was the user prompted for input by the line in the questionnaire that did not have a semicolon in front of the line.

PPE Files

Because PPE files are made from the PCBoard Programming Language the actual creation of these files are too complex to cover in this section. Instead, you should refer to the documentation that was included with the optional PPL Compiler package for further instructions.

If you are given a PPE file and need to install it on your system, simply enter the PPE filename in the Script Questionnaire Files field including the .PPE extension. PCBoard will know that it is a PPE file and execute it properly.

Reading Responses

The entire purpose behind questionnaires is to get responses from the users who fill them out. The responses to your questionnaire will be stored in the filename you specified in SCRIPT.LST as the answer file. The following is a sample entry in SCRIPT.LST:

    SCRIPT Questionnaire Files      SCRIPT Answer Files
    --------------------------      -------------------

1) C:\PCB\MAIN\SCRIPT1 C:\PCB\MAIN\ANSWER1

In this example, all answers will be written to a file called ANSWER1 located in the C:\PCB\MAIN\ subdirectory.

Standard Questionnaires

The response or answer file for a standard questionnaire follows a very rigid format. PCBoard will begin the response with a row of asterisks (*) to help separate this response from any previous responses.

The next line contains the name of the user that filled out the questionnaire, the date and time the questionnaire was filled out, the node number the user was on, the security level of the user, and finally the expiration date of the user.

The rest of the lines in the response file show the question, and the response of the user. Only the question line is recorded. If you use comment lines in your script questionnaire they will not be recorded.

PCBoard will continue to append responses to the file so you may want to periodically delete the response file after you have reviewed the answers.

PPE Files

Because PPE files are created using PPL (PCBoard's Programming Language) the way the responses are stored is the responsibility of the PPE author. Therefore, if you do not understand the response format, contact the author of the PPE file.

Disabling Scripts

You can disable script questionnaires simply by blanking the SCRIPT and SCRIPT.LST fields in the conference configuration of PCBSetup. If it used to look like

Scripts     : C:\PCB\GEN\SCRIPT            : C:\PCB\LST\SCRIPT.LST

change it to read

Scripts     :                              :                       

By doing this, your users will be notified that no scripts currently exists when they try to fill out a script questionnaire.

Creating The Menu

In order for your users to know what scripts are available on your system (if any), you need to edit the Script Menu Listing file. This file is commonly referred to as SCRIPT.

This is the file that is displayed to the user when they execute the S user command. This file is nothing more than a text file. Because it is a text file, you can design it to look or display anything you want. As a general rule it should contain the script number and a description of each script questionnaire. The following is a sample script questionnaire menu file:

Scripts Available On This System
------------------------------------------

[1] Order a subscription to this system
[2] Order a product we sell

You can create this text file using just about any text editor. Better yet, if you have defined your text editor or graphics editor in PCBSM, you can simply press F2 or F3 (depending on which file you want to edit). Otherwise you will have to manually edit the files while at the DOS prompt.

conference_setup/script_questionnaires.txt · Last modified: 2024/01/17 16:51
CC Attribution 4.0 International Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution 4.0 International