EleBBS Questionnaire Script Language =================================================================== The original questionnaire script language was created in 1986 for QuickBBS by Adam Hudson, and was later rewritten and improved during the early 1990's for RemoteAccess BBS by Andrew Milner. Other variations were created for SuperBBS, ProBoard, EzyCom, and Concord BBS's. The EleBBS Q-A script language is compatible with RemoteAccess's version of the questionnaire script language, yet adds many more commands and features, thus making it considerably more powerful. The name "questionnaire" refers to the original versions which only were able to ask questions, record the answers, and change the users security level based on their answers. The EleBBS script language goes far beyond that, allowing applications and utilities to be created. Questionnaire script files always have the extension .Q-A. Each script is a plain text file, and contains one command per line. The available commands are listed below. Note that the command interpreter is not case-sensitive, so the command "Ask" could be entered as either "ASK" or "ask". In addition to Questionnaire scripts, EleBBS also supports another scripting language called EleXer. This scripting language is considerably more powerful, and is based on Pascal. When EleBBS is told to run a script, it first looks for an EleXer version of the script (filename.elm) and if it does not exist, it then looks for a Questionnaire version of the script (filename.q-a). How to run a Script: ==================== Scripts are usually executed from a menu, using the menu Type-12 (execute a script) command with the name of the script in the OptData field of the menu. The path and extension should not be be included. If you are not familure with using the menu editor (ELCONFIG -M) then I suggest you download and read RA.DOC. Scripts may also be executed from any prompt in the language file, or from any external text file, by using the following code: ^K@FILENAME| Please note that ^K means control-K, not the letters ^ and K. To enter a control code into the language editor, you must first press control-P before pressing the actual control code. The filename goes after the @ character, and is followed by a |. This example would execute filename.q-a if it exists in the Q-A directory that is defined for the current language file. Auto-Running Scripts: ===================== The following script filenames are automatically executed by EleBBS under certain conditions, if they exist. EleBBS first tries to run their EleXer equilavent, so if DOBCFAIL.ELM (compiled EleXer script) exists, it is run instead of DOBCFAIL.Q-A. DOBCFAIL.Q-A Runs when the "Date of Birth" security check fails. NEWUSER.Q-A Runs the first time a new user calls the BBS. NOCREDIT.Q-A Runs when the users credit balance reaches zero. SUBDATE.Q-A Runs when the users subscription date expires. SUBDAYnn.Q-A Runs nn days before the users subscription expires. (ie: SUBDAY10.Q-A is run 10 days before it expires) YESNO.Q-A Replaces "Yes/No" prompts in the language file. EDITMNU.Q-A Replaces (Abort), (Help), (Save), (Continue). MAILREAD.Q-A Replaces Would you like to read this mail now? MSGBAR.Q-A Replaces Next, Last, Again, Reply, Enter, Delete. READTYPE.Q-A Replaces Forward, Reverse, New Msgs, Individual, RDSELECT.Q-A Replaces From name, To name, Subject, Keywd in text. RDMSG.Q-A Replaces the internal Message Header (to:, from:). RDMSGPS.Q-A Replaces the internal Message Header (with pausing). DATEDIT.Q-A Replaces the internal Date Entry Routine. FA-CHNG.Q-A Replaces the internal File Area Changer. FG-CHNG.Q-A Replaces the internal File Group Changer. MA-CHNG.Q-A Replaces the internal Message Area Changer. MG-CHNG.Q-A Replaces the internal Message Group Changer. COMBINED.Q-A Replaces the internal Combined Msg Areas Selector. LASTCALL.Q-A Replaces the internal Last Callers Lister. WHONLINE.Q-A Replaces the internal Who's Online Lister. EDITFTR.Q-A Message Editor Footer Script. (required) EDITHDR.Q-A Message Editor Header Script. (required) EDITHLP.Q-A Message Editor Help Script. (required) EDITMNU.Q-A Message Editor Menu Script. (required) EDITQTO.Q-A Message Editor Quote Script. (required) The EDIT*.Q-A scripts are only required if you enable the internal message editor in EleBBS. All the other .Q-A Scripts are optional, and if they do not exist then EleBBS will use its regular method of handling the task internally. FDB HTML Scripts ================ FDBHTML.ELM Used by "ELEFILE HTMLIST". (Not used by EleBBS). The FDBHTML.ELM files are used by ELEFILE.EXE to make HTML listings of the FDB (File DataBase), and can create both file area listings as well as newfile listings. These .ELM files are only looked for by ELEFILE in the *current* directory, rather then in the normal script directory that EleBBS uses. See the sample FDBHTML.PAS file included in EXCFG.ZIP for an example on how to write this sort of scripts. High-Ascii characters in the file descriptions can be remapped to whatever characters you perfer in the HTML files, by having a file called CHARMAP.CTL in the current directory. See the example CHARMAP.CTL in EXCFG.ZIP for more information. This mapping is implemented in FDBTHML.PAS itself. Script Command Listing =================================================================== All the script commands which are supported by EleBBS are described in this section. Each command name is listed along with the proper syntax, a description, and one or more examples of its usage. Ask (RA/ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Ask Description: Allows the user to enter a string of characters. Up to characters can be entered, which can be a number from 1 to 255. The string of characters the user enters are stored in the defined variable number. Example: Ask 60 1 Allows the user to enter a string of up to 60 characters in length. This string is then stored in variable number 1. Ascii (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Ascii Description: Stores the character with the ASCII value into the defined variable number. Example: Ascii 1 178 This puts the character with ASCII value 178 into variable number 1. Assign (RA/ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Assign [%] | <#var num | @var num> Description: Assigns a text string to a variable. A text string can contain spaces, but any trailing spaces after the last word will be removed. If the text is all numeric digits, then it can also be interpreted as a value amount. This command can also be used to copy the contents of one to another, either directly by using the "#" symbol in front of the you want to copy from, or indexed by using the "%" symbol on front of an index variable number. Indexing is done by reading the value of the index variable number, and that number becomes the variable number to read the final result from. Example: Assign 1 Hello World! Display "|Variable number 1 is: " 1 This assigns "Hello World!" to variable number one and sends "Variable number 1 is: Hello World!" to the display. Example: Assign 1 Apple Assign 2 #1 Display "|Variable number 2 is: " 2 This assigns "Apple" to variable number 1, copies variable number 1 to variable number 2, and sends "Variable number 2 is: Apple" to the display. Example: Assign 1 5 Assign 5 Five Assign 2 %1 Display "|Variable number 2 is: " 2 This assigns "5" to variable number one, assigns "Five" to variable number five. It then looks up the variable number stored in the index (variable number 1), and since this is 5 it then reads variable number 5 to get the result, which is copied to variable number 2. It finally sends "Variable number 2 is: five" to the display. Example: Assign 1 ^KO If 1~ < 10 Display "You have less then 10 minutes remaining." EndIf This will assign the number of minutes remaining to variable number 1, and if it is less then 10 it will display the message. Break (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Break Description: Ends a While-Do loop before it's finished. The Break command can only be used between the While-do and EndWhile commands. Example: While 1 < 100 do {whatever stuff here} If 10 = 0 Break EndIf EndWhile Capitalise (RA/ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Capitalise Description: Turns on or off forced input capitalization. This allows you to force any following "ask" statements to set the users input to all upper or lower-case letters. This Capitalise setting will stay effective in the script until another Capitalise command is encountered. Example: Capitalise ON Forces all following "ask" statements to set the users input to capital letters until a "Capitalise OFF" statement is encountered. Calc (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Calc Description: This performs a mathematical calculation and stores the result into the first variable. The operators supported are: <+> <-> <*> <%> which are called add, subtract, multiply, divide, and mod. Mod is used to get the remainder after a divide (modulo). Example: Calc 1 2 + 3 This will add the value of variable number 2 with the value of variable number 3 and stores that result into variable number 1. Example: Calc 1 2 / 3 This will divide the value of variable number 2 by the value of variable number 3. If the result is a non-integer value, the decimal point and any numbers to the right of it will be removed (so it becomes an integer). The result is stored in variable number 1. Cfg_File**** (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Cfg_FileOpen Cfg_FileRead Cfg_FileWrite Cfg_FileSeek <#var num | position> Cfg_GetInfo # Cfg_SetInfo # Cfg_FileError <#var num> Cfg_FileClose Description: These functions allow a script to access virtually all of the EleBBS config files and data files, and can also write changes to these files. These are very powerful commands which could destroy your user/file/message databases if they are used improperly! can include the full path to the filename, but if no path is given then EleBBS will look for this file using the normal searching methods. can be any of the following file types: LIMITS, LANGUAGE, LASTCALL, FDBHDR, FDBIDX, USERSBBS, USERSIDX, SYSINFO, MENU, EVENTS, MESSAGES, MESSAGESELE, GROUP, FILES, FILESELE, MODEM, CONFIG, CONFIGELE, PROTOCOL, TELNET, LIGHTBAR, NEWSSERVER, NEWSGROUP, USERONBBS. The field-numbers can be counted by looking at the corresponding EleBBS Structure file. Or you can use a small script to display each record along with its number. Example: ; Open the file Cfg_FileOpen 1 c:\ele\config.ra CONFIG ; Read the contents Cfg_FileRead 1 ; Get fieldnumber 43 Cfg_FileGetInfo 1 43 1 ; Display it to the user Display "Systemname = " 1 ; Change it Assign 1 "The New Improved BBS Name" ; Set the changes back into the record Cfg_FileSetInfo 1 43 1 ; Return to the beginning of this file Cfg_FileSeek 1 0 ; Write the changes back Cfg_FileWrite 1 ; Close the file. Please note that the changes are ; not applied until the file is re-read. For CONFIG ; this means that changes won't be made effective ; until EleBBS restarts. Cfg_FileClose 1 whole number (integer), and is stored in . ChangeColor (RA/ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: ChangeColor Description: Sets the color of all future characters sent to the display until a color change command or code is encountered, or until the end of the script is reached. Standard decimal codes are used. If the user does not have ANSI/AVT graphics enabled then this command is ignored. See color code chart under Display command for decimal color codes. Example: ChangeColor 15 0 Changes the text color to a white foreground on a black background until another color change statement or code is encountered. ClearScreen (RA/ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: ClearScreen Description: Clears the display if the user has their screen clearing codes enabled. Otherwise, this command is ignored. Example: ClearScreen This would clear display screen. ConCat (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: ConCat Description: Concatenates (combines) 2 variables, and stores the results into another variable. If the total length of the combination is over 255 characters then it is truncated after character 255. Example: Assign 2 Ele Assign 3 BBS Concat 1 2 3 Display 1 This will display "EleBBS" Commit (RA/ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Commit Description: Usually, all responses are stored in a queue and are written to disk when the questionnaire terminates. The COMMIT command forces the queue to be written to disk immediately. Example: Commit This will cause all responses stored in the queue to be written to disk immediately. Cursor (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Cursor Description: Moves the cursor to the Horizontal and Vertical positions defined. It is similar to using both the SetX and SetY functions. Variables can NOT be used with this command. Example: Cursor 79 22 This places the cursor at position 79 22 Dec (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Dec Description: Decreases the variable value by one. Example: Dec 1 Will subtract one from the value of variable 1. Define_HTML (ELEFILE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Define_HTML Description: This is only supported by ELEFILE.EXE. It can NOT be used from EleBBS itself. Used to define which HTML file all further output in this script will be redirected to, which is processed during an "ELEFILE HTMLIST" command. Example: Define_HTML c:\html\new%DAYSOLD.html DefineOutput (RA/ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: DefineOutput Description: Usually, the users responses to the questionnaire are written to a file called filename.ASW (where filename is the name of the .Q-A script that is being executed. This command allows the script to specify a different name for the output file. Example: DefineOutput C:\BBS\ANSWERS.TXT This would cause all user responses to be stored in the file C:\BBS\ANSWERS.TXT. Delay (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Delay Description: Delays the system for milliseconds. 1000 milliseconds is one second. Example: Delay 1000 This will delay the system for one second. DeleteMsg (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: DeleteMsg Description: Deletes a message from the specified message base. The first two parameters may either be a value, or can be a <#var num>. The third parameter can be either YES or NO, and sets whether Elebbs should check if the user has access to delete that message. If YES is specified then the message is only deleted if the user has access to delete it. Assign 1 5 Assign 2 100 Example: DeleteMsg #1 #2 YES This will delete message number 100 from message area number 5, if the current user has proper access to delete to that particular message. Delimit (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Delimit [] or [] [] or [] [] or [] Description: Shortens the length of a variable to the defined number of characters, if the variable is currently longer then this value. This can be identical to using the function "Substring 1 " You can also optionally pad a variable with spaces or zeros to force it to a fixed length. The mode is assumed by default, so the padding is done to the left of the existing characters. You can specify to pad in front of the existing characters instead if desired. Color codes can be either counted or ignored by specifying or as the last parameter. Example: Assign 1 EleBBS Delimit 1 3 This will shorten variable 1 from 6 to 3 characters, changing it to "Ele". Example: Assign 1 EleBBS Delimit 1 10 space This will lengthen the size of variable number 1 from 6 characters to 10 Characters, changing it to "EleBBS ". Example: Assign 1 EleBBS Delimit 1 10 space front This will lengthen the size of variable number 1 from 6 characters to 10 Characters, changing it to " EleBBS". Display (RA/ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Display [] [] Description: Unlike the Display function in RemoteAccess, this will allow you to display either text, a variable, or even both. Any pipe symbols "|" are converted to carriage returns. You can display any of the Ctrl-A through Ctrl-X control codes listed here, as well as several special EleCodes that begin with the ` character: Control Code System Function Performed ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ ^A Waits for any key to be pressed. ^B Disable aborting display with the S key. ^C Enable aborting display with the S key. ^D Enable the Continue? prompt (turns on page pausing). ^E Disable the Continue? prompt (turns off page pausing). ^F User parameter (see MACROS.TXT). ^G Produce a beep on the caller's console. ^H Backspace. Moves cursor one space back. ^I Tab. Moves cursor forward to next 8th position. ^J Linefeed. Moves cursor down one line. ^K System parameter (see MACROS.TXT). ^L Clears the display if the users clear screen setting is enabled. ^M Carriage return. Moves cursor to far left. ^V Reserved for AVATAR. ^W Pause for one second. ^X Execute a program in a command shell. The ^X is followed by the command line you want to execute, and is terminated by a | (pipe) character. This can be disabled in ELCONFIG. (see EXEC command for macros). ^Z "End Of File" marker. (Don't use this). EleCode Function Performed ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ `Fc: Set the foreground color to the value 'c'. `Bc: Set the background color to the value 'c'. Foreground color values can be 0 to 15. Background color values can be 0 to 7. Example: `F1:`B2: sets forgrnd=1, bkgrnd=2 `Acc: Sets both background & foreground colors. This is a bit tricky to use, as 'cc' is a decimal value, determined by the equation: cc= (bkground color x 16) + foreground color. You can activate the "blinking text" mode by adding 128 to this value. `Gx,y: Move cursor to screen location 'x,y' example: `G70,23: goes to x=70, y=23 `Da,b: Duplicate ascii character 'b', 'a' times Example: `D32,10: displays 10 spaces. `Xx: Sets cursor to horizontal position 'x', which can be a vaule from 1 to 80. `Yy: Sets cursor to vertical position 'y', which can be a value from 1 to the length of the users display. `X+n: Moves cursor 'n' positions to the right. `X-n: Moves cursor 'n' positions to the left. `Y+n: Moves cursor 'n' positions down. `Y-n: Moves cursor 'n' positions up. * Cursor moves stop at edges of screen. `S: Clear display (regardless of user setting) Colors can also be set using the ^K[cc macro, in which cc = a pair of Hexadecimal digits, the first digit is the background color code, and the second digit is the foreground color code. Standard Color Codes ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Background Flashing Colors Standard Forground (Hex) ----------------------------------------- Black 0 8 Blue 1 9 Green 2 A Cyan 3 B Red 4 C Purple 5 D Brown 6 E Grey 7 F Foreground Decimal Hexadecimal Colors Numbers Numbers ----------------------------------------- Black 0 0 Blue 1 1 Green 2 2 Cyan 3 3 Red 4 4 Purple 5 5 Brown 6 6 Gray 7 7 Dark Gray 8 8 Bright Blue 9 9 Bright Green 10 A Bright Cyan 11 B Bright Red 12 C Bright Purple 13 D Yellow 14 E White 15 F Example: Display "`F15:Hello|" This will set the forground color to white (15) and displays "Hello" and a carriage return. Example: Display 1 This will display the contents of variable 1. Example: Display "The result is " 1 This will display both the text and the contents of variable 1. DisplayLocal (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: DisplayLocal [] [] Description: This is similar to the Display command, but it will only display the text on the local side. The sysop will see the text, but not the user. Example: DisplayLocal "Hello|" This will display the text "Hello" followed by a carriage return to the sysops screen only. All the same macros and codes are supported as in the "Display" command. DisplayFile (RA/ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: DisplayFile Description: Displays a text file on the display. The text file must be located in the text file directory, and the file's extension (.ASC/.ANS/.AVT/.RIP) is automatically determined according to the users mode settings, in the same way menu type-5 works. The used must not include any extension, as this will automatically be found. Example: DisplayFile WELCOME This displays the file WELCOME.A?? from the text files directory. DoContinue (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: DoContinue Description: Sets to YES or NO depending on the last choice the user selected on a "Continue?" (same as "More? Y/N/=") language prompt. Example: DoContinue 1 This will set variable number 1 to YES if the user selected YES to the last Continue prompt. EmulateInput (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: EmulateInput Description: Pushes one or more keys into the users input buffer. Here after, EleBBS treats them as if they were actually pressed by the user. The ';' character is converted to a carriage return. Example: Emulateinput F Places an 'F' into the users input buffer. EmulateSys (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: EmulateSys Similar to the Emulate input command. Pushes one or more keys into the sysops input buffer. Here after, EleBBS treats them as if they were actually pressed by the user. The ';' character is converted to a carriage return. Example: EmulateSys X Places an 'X' into the sysops input buffer. EmulateVar (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: EmulateVar Description: Similar to the EmulateInput command. Pushes one or more keys (contained in the variable) into the users input buffer. Here after, EleBBS treats them as if they were actually pressed by the user. Example: EmulateVar 1 Places the contents of variable number 1 into the users input buffer. EmulateSysVar (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: EmulateSysVar Description: Similar to the EmulateInput command. Pushes one or more keys (contained in the variable) into the sysops input buffer. Here after, EleBBS treats them as if they were pressed by the sysop. Example: EmulateVar 1 Places the contents of variable number 1 into the sysops input buffer. EndIf (RA/ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: EndIf Description: Used in conjunction with the If command, this signifies the end of an If condition. The function of If and EndIf are explained under the If command. Example: See the If script command. Exec ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Exec Description: Executes an external program from a command prompt in the same way that a menu function type 7 (Run an external program in a shell) is performed. All the command-line parameters that are valid in a menu function type 7 can be used here as well. Valid parameters are: *A Writes users handle to DORINFO1.DEF drop file. *B Passes the baud rate of the connection 0=local. *C The path\filename of the command interpreter i.e.: c:\windows\command.com *F Users first name *G Users ANSI settings: ON or OFF *H Leave the fossil hot (DOS version only) *L Users Last Name *M Tells EleBBS to shell out of memory before running (only used in DOS versions of EleBBS) *N Node Number, as specified with the -N parameter when ELEBBS.EXE was run. *O Overrides the users baud rate with hardcoded value, i.e.: *O19200 *P Communications (COM) port being used, 1-255. *R Users Record number in the user file. *S Generates a custom exit file. See RA.DOC. *T Time Remaining in minutes for this call. *U Passes a 10 char useron status. ie: *UDwnloading *V Avoids clearing the screen first, and does not send a "wait... loading." prompt. *W the comporthandle, used by Ele/Win32 for Win32 doors. *X causes a TAGLIST.RA list of tagged files to be written to the current (nodes) directory. When used from ELEMGR.EXE, *X causes @ to become the DOS style 8.3 pathname instead of long form. *Z Avoids running SFOS.BAT and UFOS.BAT before and after the specified command line. Adding this to non-fossil applications will improve load time. *! Stops the system timer for the duration of the shell, so the users time is not reduced. *# Turns the "Wants Chat" indicator off afterwards. *0 The path to the currently selected file area. *1 The path to the currently selected message area. Example: Exec C:\BBS\FILEDOOR.EXE *R *P *N This executes a command line which runs the FILEDOOR.EXE program and passes it the users record number (*P), the com port # (*P) and the BBS node number (*N) to the program. Example: Exec *C /c C:\BBS\BAT\TWARS.BAT *N This executes a command line that runs a batch file called TWARS.BAT, and also passes it the BBS node number (*N) to the batch. Under DOS and Win9x/ME, it is required to load the command processor with the /c option in order to run a batch file (*C /c). Under Windows NT and Win2000 this is not required. FileExist (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: FileExist <[path]filename or #var num> Description: Sets to either YES or NO depending on whether the specified file exists or not. A Variable can also be used for the filename. Example: FileExist 1 c:\bbs\busy.sem Places YES in variable number 1 if the file exists. Example: Assign 2 c:\path\anyfile.txt FileExist 1 #2 Places YES in variable number 1 if the file exists. FileOpen (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: FileOpen <[path]filename> Description: Opens file number . This needs to be done before the file can be accessed using the fileread and filewrite commands. Example: FileOpen 1 c:\bbs\data.txt Opens file number 1 for read/write access. FileRead (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: FileRead Description: Reads one line of text from a currently open text file. Example: FileOpen 1 c:\bbs\data.txt FileRead 1 100 FileRead 1 101 Reads the first line of text from the file into variable number 100, and the second line of text into variable 101. FileWrite (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: FileWrite # Description: Writes one line of text to the end of a currently open text file. Example: FileOpen 1 c:\bbs\data.txt Assign 100 Here is a new line of text FileWrite 1 #100 Writes the text to the end of the file. FileClose (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: FileClose Description: Closes a currently open file. All files that are opened in a script should later be closed. Example: FileClose 1 Closes file number 1, so that other programs can now access it. FileDelete (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: FileDelete <[path]file name> Description: Deletes the specified file. Example: FileDelete c:\path\tempfile.txt Deletes the file from the hard drive. GetArrowKey (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: GetArrowKey Description: Waits for the user to press a key and returns the key pressed in the defined variable. If one of the arrow keys is pressed, then one of the words "UP", "DOWN", "RIGHT" or "LEFT" is returned in the variable according to the key pressed. The Ins and Del keys will return "INSERT" and "DELETE". Any alpha keys (a-z) are converted to upper case automatically. The Enter key is converted to the pipe symbol "|" to make it easy to check for. Example: GetArrowKey 1 Gets the pressed key in variable number 1. GetBBSOS (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: GetBBSOS Description: Writes the Operating System that this version of EleBBS was compiled for to the defined variable. Note that if you are running the DOS version of EleBBS under OS/2 or Windows, it will still report "DOS" as the OS version. Current possibilities are "DOS", "OS/2", "WIN32", and "Linux". Example: GetBBSOS 1 This will put the name of the OS this EleBBS is designed for into variable number 1. GetChoice (RA/ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: GetChoice Description: Waits for the user to enter one of the characters in and stores the character in the variable . The character entered is not case-sensitive. Example: GetChoice YN 1 This allows the user to press either the "Y" or "N" key, and then stores the selection in variable number 1. GetEnv (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: GetEnv Description: Gets an Environment variable and places it into the specified . Example: GetEnv 1 ELEBBS This gets the contents of environment variable %ELEBBS% and stores it in variable number 1. GetGraph (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: GetGraph Description: Writes a list of all the current graphic modes to the variable so that an "If In" statement can be used to determine which modes are on. Example: GetGraph 1 If ANSI, AVATAR, and RIP are all currently enabled, then variable 1 will be set to contain all those keywords, "ANSIAVATARRIP" so that each code can be checked for. Example: GetGraph 1 Assign 2 ANSI If 2 in #1 Display "ANSI is enabled" EndIf GetParameter (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: GetParameter Description: This retrieves a parameter as given on the command-line by EleBBS. This can be useful if you want to use one script several times. This command is also used in the YESNO.Q-A file which is automatically run instead of the regular '(Y/n)?' prompt. Example: GetParameter 5 1 Assigns parameter 1 to variable number 5. GetRawKey (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: GetRawKey Description: Similar to the GetArrowKey function, but does not convert the pressed key to upper case, and it does not convert the Enter key to a pipe symbol. It waits for a keypress from the user and returns the key pressed when there was no cursor key pressed. When there was a cursor key pressed, EleBBS will return "UP", "DOWN", "RIGHT" or "LEFT" according to the key pressed. The Ins key will return "INSERT" and the Del key will return "DELETE". Example: GetRawKey 1 Gets the key pressed in variable number 1. GetSystemName (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: GetSystemName Description: Puts the Name of your BBS into . This is the name you have defined in ELCONFIG under SYSTEM > SITE INFO. Example: GetSystemName 1 This puts the BBS name into variable number 1. GetTelnet (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: GetTelnet Description: Puts YES or NO into depending on the type of session. This only returns YES if the session is started using EleBBS's TELSRV, not with other telnet servers like COM/IP or NetModem. Example: GetTelnet 1 This puts YES into variable number 1 if the current node is running EleBBS's TELSRV. GetVolumeLabel (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: GetVolumeLabel Description: Writes the Volume label of the hard drive specified to the variable. Example: GetVolumeLabel 1 C: This will put the volume label of drive C: into variable number 1. GetXY (ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: GetXY Description: Gets the X and Y screen positions of the cursor into the two variables. Example: GetXY 1 2 This will put the X position of the cursor into variable number 1, and the Y position of the cursor into variable number 2. Gosub (RA/ELE) ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ Syntax: Gosub