BackTalk 1.30 Copyright 1991 by Steve Ahlstrom and Don Curtis Copyright and Distribution Notice: BackTalk is a copyrighted program. BackTalk is freely distributable provided the following files (listed below) remain UNCHANGED and AS A WHOLE in LHARCIVE FORM along with this notice. All rights to the program BackTalk and all files in this archive, except where specifically noted, remain the property of Steve Ahlstrom and Don Curtis. BackTalk may not be sold or distributed for any fee. The exception to this is that BackTalk may be included on any Amiga User Group Club disks on which BackTalk is not the only program on the disk and the disk does not sell for more than $10US. Disclaimer: No warranty is offered and no fitness for any particular purpose is claimed. Every effort has been made for this software to perform as indicated in the documentation. However, nothing is perfect. Credits: Thanks to the creators of the XPR library specification. Thanks to the authors of the various XPR libraries. Do be aware than that, depending upon implementation, some of these libraries work better than others. Thanks to Khalid Aldoseri for this File Requester library, his considerable help and expertise with suggestions, coding hints, and support all while he was constantly donning his gas mask and seeking shelter from SCUD attacks. And special thanks to the corp of BackTalk testers who include, but are not limited to, Khalid Aldoseri, Larry, Phillips, Bob Rakosky, Steve Pietrowicz, Betty Clay, David Art, Brian Bartlett, Vic Wagner, Jim Williams (eet), Michael McCormick, and Rick Stevens. Files in this LHARCHIVE: BackTalk This is the terminal program "BackTalk" BackTalk.info Icon for BackTalk BackTalk.doc This file *frqlib.lzh Khalid Aldoseri's File Requester library (ver 2.0). This is the full distribution of the library, auxillary programs, user documentation, and programmer documentation. Release 3.0 of Khalid's file requester library is due to be released "any day now" (as of the the date this is written, 24 Feb 1991). It is fully backward compatible with previous versions and with BackTalk's calls to the library. *xprquickb.library Jack Rousse's CompuServe QuickB XPR library updated and modified by Don Curtis *xprzmodem.library Rick Huebner's XPR Zmodem library version 2.1. Previous versions of this library will NOT work with BackTalk and will likely cause a guru. *xprascii.library an ascii XPR library distributed with the XPR 2.0 specification *and various example ARexx scripts * These files freely distributable and all rights to them remain with their authors. --------------------------------------------------------------------------- BackTalk A general purpose TTY-type telecommunications program for the Amiga Feature Overview: - Supports the XPR specification. You may use any file transfer protocol for which there exists an XPR library implementation. At the time of this writing there exists XPR libraries for CompuServe QuickB, Zmodem, Xmodem, Kermit, and Ascii. - Fully supports user selected fonts, including proportional fonts. - ARexx interface - callable internally and externally 110 ARexx commands and growing - ARexx scripts callable from FKey macros - Full featured Review Buffer - Program will operate in a 1 or a 2 bit plane custom screen or in a workbench window. - If run in a hi-res/interlaced environment, a "split" is provided (half screen) - Capture Buffer for saving text to a file - Chat Window for network conferencing. - Color requester for loading and saving color choices - Phone book limited only by available memory. Baud rate loaded from phone book entry. - Real time clock - A non-graphic Print Screen function - Print feature for echoing incoming text to a printer Minimum System Requirement: Amiga 500/1000/2000/3000 with a minimum of 512k and 1 floppy drive Modem: 300/1200/2400/4800/9600 --------------------------------------------------------------------------- How to Use BackTalk Before running BackTalk for the first time, decompress frqlib.lzh and place kd_freq.library, xprquickb.library, xprzmodem.library and xprascii.library files in your LIBS: logical directory. Library file names are case sensitive, please do not change them. BackTalk will not run without kd_freq.library and xprquickb.library. BackTalk will open its screen/window in whatever resolution your computer is in at the time the program is run. When BackTalk loads, it looks for 3 files, BT.CFG (its configuration file), BT.MACROS (it's macro key file), and BT.PHONES (its phone book data file). BackTalk will look in the current directory for these files. If it does not find them there, it will look in S:. Since first time users will not have these files, BackTalk will put up a requester informing the user that the files cannot be found and will then use its internal defaults. FIRST TIME USERS, PLEASE TAKE NOTE. When BackTalk attempts to load its data files (BT.CFG, BT.MACROS, and BT.PHONES) it looks FIRST to your current directory. If not found it then looks to S:. When you create these files they will be saved to where ever they were read from (current directory or S:). This means that for first time use they will not be read from S:. The files will be saved to current directory. If you want these files to be in S: in future runs of the program, you must copy them there after BackTalk creates them. From then on, when updating these files from within BackTalk, they will be saved to S: because they were read in from S:. The most coherent method to document BackTalk is to describe the function of its menu items (from left to right) and their subitems. Menu: BackTalk SubItem: About Hot Key: Right-Amiga-A This brings up a "credits" requester containing copyright, support, and distribution information. SubItem: Hangup Hot Key: Right-Amiga-H This will cause your modem to hang up the phone. This is done by dropping DTR. If your modem is setup to ignore DTR or you are using a 3 wire serial cable between your computer and your modem, this command has detects that dropping DTR had no effect and will then send the standard Hayes compatible "+++ATH" string to your modem. SubItem: Quit Hot Key: Right-Amiga-Q This will terminate the program. Menu: Phone SubItem: Dial... Hot Key: Right-Amiga-P This brings up the Phone Directory. The Phone Directory displays 10 entries. If there are more than 10 entries, you may scroll through them using the UP and DOWN arrow keys. You may select the entry to dial by using the mouse and clicking upon the entry or by typing the number to the left of the entry from the keyboard. This will place the entry into the string gadgets below. You may dial the entry by clicking on the gadget labeled "Dial" or by typing "D" from the keyboard. The phone number will be sent to the modem with a terminating carriage return. If for any reason you do not want the carriage return sent, in the phone number portion of that entry, place an asterisk (*) as the last character in the phone number (see "Adding Phone Book Entries" and "Editing Phone Book Entries" below). When "Dial" is clicked upon or the letter "D" is typed, the phone number will be sent to the modem without a terminating carriage return. Adding Phone Book Entries: To add a phone book entry, click on the "Add" gadget with the mouse. This will activate the "System" string gadget. Type in the name and then type return. The "Phone" string gadget will now be activated. Enter the phone number to be dialed and type a return. The "Comment" string gadget will be activated. Enter a comment if you wish, and type return. The "Baud" string gadget will be activated. In this string gadget the current baud rate will be displayed. If you wish this Phone Book entry to have a different baud rate, enter it here, otherwise just hit return. Should you enter an invalid baud rate, (ie, NOT 300, 1200, 2400, 4800, 9600, or 19200) the current baud rate will be used and saved with the Phone Book entry. The "Modem Prefix" string gadget will be activated. The "Modem Prefix" string gadget serves two purposes. The information entered here will be prepended to the phone number when it is sent to the modem. This is also a "terminator" field for the Phone Book entry. If you do not type a return in this gadget the Phone Book entry will not be added. By default, an "ATDT" is placed in the "Modem Prefix" string gadget. If this is acceptable, just type a carriage return, if not, enter your dialing prefix and type a carriage return. Editing Phone Book Entries: To edit an existing Phone Book entry, select the entry to be edited by clicking upon the entry or by typing the number of the entry. The entry will be placed into the string gadgets below. Click the mouse on the string gadget you wish to change and make your changes. When you type a carriage return in the "Modem Prefix" string gadget, the changes will be accepted. Deleting Phone Book Entries: To delete an existing Phone Book entry, select the entry to be deleted by clicking upon the entry of by typing the number of the entry. The entry will be placed into the string gadgets below. Click the mouse on the "Delete" gadget. The entry will be removed from the list. The Phone Book entries are "hot keyable" from within the requester by using the number keys 1-1(0). The Dial and Exit gadgets are also hot keyable using the D and E keys, respectively. If there have been any changes to the Phone Book those changes will be written to the file BT.PHONES when you exit the Phone Book (by using the Dial or Exit gadgets). SubItem: Redial Hot Key: Right-Amiga-$ This will cause the last dialed Phone Book entry to be dialed again. Menu: Serial SubItem: Serial Definitions... Hot Key: Right-Amiga-* This brings up the Serial Definitions requester. Most of the items within this requester are self explanatory. If you are using a modem or a serial card that requires the use of a serial device driver other than the CBM supplied "serial.device" make sure that device driver is located in your LIBS: directory. Enter the name of the device driver (the name is case sensitive) into the "Device Name" string gadget. If a unit number other than 0 is required, enter the unit number into the "Unit #" string gadget (check the documentation for your non-CBM supplied device driver for this information. NOTE: There appears to be a problem with CBM's serial.device that is distributed with the A2232 card. The symptom is that when a unit number other than 0 is being used, attempting to close and reopen the port while online will cause BackTalk to hang. To exit the Serial Definitions requester, click on the Cancel or Use gadgets, or type the letter C or U. If you have made changes and selected "Use", those changes will go into effect immediately. By selecting "Cancel" all changes will be negated and your serial definitions will remain as they were before you entered the Serial Definitions requester. SubItem: Send Break Hot Key: Right-Amiga-~ (tilde) This sends a break signal. Menu: Files SubItem: Protocols... Hot Key: NONE BackTalk utilizes the XPR protocol specification. This menu item will bring up a file requester from which you may load the xpr library you would like to use. By default, the file requester will display files in LIBS: that begin with XPR#?. SubItem: Download Hot Key: Right-Amiga-D When selected you will be presented with a file requester for you to indicate the path and file name of where the download will be written. Some transfer protocols are "autostart" meaning that when you tell the system you are calling that you want to download a file the file transfer starts automatically. You will be prompted for the location of where the file will be written. In this case, the DOWNLOAD menu option will be ghosted. An example of an autostart protocol is CompuServe QuickB protocol. You would simply type "DOW filename", Compuserve will respond with "Filename for your computer". You would respond with the path/filename of the file you are downloading. The transfer will start automatically at that point. SubItem: Upload Hot Key: Right-Amiga-U Same as DOWNLOAD only in the reverse direction. SubItem: Capture On Hot Key: Right-Amiga-O A file requester will be presented with the default path and filename taken from the path and filename you indicated in the Global Options requester (more on the Global Options requester later). If this is acceptable, hit return and the capture file will be opened. If it is not acceptable, enter the desired path and filename. Should you open a capture file, and that file already exists, the new information will be appended to the existing file rather than overwriting the existing file. SubItem: Capture Off Hot Key: Right-Amiga-C This turns off the capture buffer and closes the capture file. Menu: Review SubItem: Show Review Hot Key: Right-Amiga-R This opens the Review Buffer. The Review Buffer is a circular buffer, 16k in size. You may move around in the Review Buffer by using the up arrow and down arrow keys to scroll a line at a time. Shifted up or down arrows will scroll a page at a time. ALT up and down arrow will move you to top or bottom of file, respectively. Clicking the mouse upper half of the display will scroll the display up one page. Clicking the mouse in the lower half of the display will scroll the display down one page. The Review Buffer has a menu attached that allows you to print the current screen or print the entire review buffer. You may also exit the Review Buffer via the menu. Other methods to exit the Review Buffer is to type Right-Amiga-Q, type ESC, or type HELP. If you are running in a workbench window, there will also be a Close Box in the upper left corner. SubItem: Save Review Hot Key: NONE This brings up a file requester with the path "RAM:ReviewBuff" as the default. If this is acceptable hit return or click on the SAVE button. If it is not acceptable, enter the desired path and file. Menu: Print SubItem: Print Screen Hot Key: Right-Amiga-Z This will send what is currently displayed on BackTalk's screen to your prt:. SubItem: Print Review Hot Key: Right-Amiga-! This will send the contents of the Review Buffer to prt:. SubItem: Echo Printer Hot Key: Right-Amiga-E All text that is displayed on BackTalk's screen will be echoed to prt:. Menu: Configuration SubItem: Global Options Hot Key: NONE This brings up the Global Options requester. Here you specify the default Upload and Download directories and the default name of the Capture file. BackTalk utilizes proportional fonts. Even if the font you have selected is not proportional, it is treated as such. When using the Chat Window (described in more detail later) lines are "auto sent" when a maximum line length is reached. This line length is based upon the pixel length of the line, not the character length of the line. You may, in the Global Options requester, specify at what pixel length the line should be sent. You are shown the current maximum line length, in pixels, that is possible (based upon your horizontal resolution) and may enter a different value in the string gadget. This feature is basicly a trial and error adventure depending on the font you are using. When using the Chat Window, as mentioned above, lines are auto sent if a maximum line length is reached before a carriage return is entered. You may elected to have a "..." automatically appended to all lines that are auto sent from the Chat Window. Appending the dots is especially user when in a conferencing area to indicate to others that you are not through typing. However, it can become a nuisance if you are leaving a message while using the Chat Window. In the Global Options requester you may select to have the dots appended or not. Also in the Global Options requester are two string gadgets, labeled "Modem Init Command" and "Modem Exit Command". Whatever string is in the Moden Init Command string gadget will be sent to the serial port immediately upon starting BackTalk. The Modem Exit Command string will be sent to the serial port just prior to terminating BackTalk. If you do not want these strings to be sent, clear these string gadgets. SubItem: Split Hot Key: Right-Amiga-S If you are running BackTalk in a hi resolution/interlaced mode, the Split command will reduce the size of BackTalk's window to half screen. Split is a toggle. If BackTalk is in half size mode, selecting split again will return it to full screen size. The state of this item is saved in the BT.CFG file. SubItem: Screen - 1 Plane Hot Key: Right-Amiga-1 Causes BackTalk to be run in a 1 bit plane custom screen. The state of this item is saved in the BT.CFG file. SubItem: Screen - 2 Plane Hot Key: Right-Amiga-2 Causes BackTalk to be run in a 2 bit plane custom screen. The state of this item is saved in the BT.CFG file. SubItem: Workbench Screen Hot Key: Right-Amiga-3 Causes BackTalk to be run in a workbench window. The state of this item is saved in the BT.CFG file. SubItem: Borders On/Off Hot Key: Right-Amiga-B This is a toggle which turns the window borders on or off. The state of this item is saved in the BT.CFG file. SubItem: Set Colors Hot Key: NONE This brings up a color requester. You may change the colors of the program with this requester. This menu item is ghosted if you are running BackTalk from a workbench window. The state of this item is saved in the BT.CFG file. SubItem: Fonts SubSubItem: Diskfonts... Hot Key: Right-Amiga-F This brings up a file requester defaulted to FONTS:. Select the font you wish to use, then select the point size, and click on use. The state of this item is saved in the BT.CFG file. SubSubItem: Topaz 8 Hot Key: Right-Amiga-8 Since Topaz is a rom font it will not show up in the Fonts file requester. This item will select the Topaz 8 font. The state of this item is saved in the BT.CFG file. SubSubItem: Topaz 9 Hot Key: Right-Amiga-9 Since Topaz is a rom font it will not show up in the Fonts file requester. This item will select the Topaz 9 font. The state of this item is saved in the BT.CFG file. SubItem: Macros Hot Key: NONE This brings up the Macros requester. Simply click on the FKey gadget of your choice, enter the text into the string gadget and type return in the string gadget. To enter a carriage return into your macros, type a ^M (either the 2 separate characters ^ and M or the 2 keys together. The same goes for any control character you'd like to embed in a macro). If you exit the Macro requester by selecting SAVE a file requester will be presented with the name of the currently selected macro file. NOTE: The filename may NOT be BT.MACROS. You may have used the ARexx command to load in an alternate macro file. A macro may contain the command to execute an ARexx script. The delimiter for ARexx script names is the backslash (\). An example ... This is a test \do_something\and another test. If the above is your macro, "This is a test " will be sent as a normal macro string. Then the ARexx script "do_something" will be run, then the text "and another test" will be sent as a normal macro string. NOTE: If you need to send a backslash as part of your macro and it's not to be used as an ARexx scriptname delimiter, preface the backslash with another backslash, ie., // . NOTE: The ARexx script name need not contain the path nor the extension. The path is assumed to be REXX: and the extension is assumed to be .BT. SubItem: Chat Window Hot Key: Right-Amiga-W This toggles the Chat Window on and off. Text typed into the Chat Window will be sent to the serial port when a carriage return is typed or when the length of the line exceeds the maximum line length (see Global Options for more information on the maximum line length). Because lines are auto sent from the Chat Window an insert mode is not provided. You may move the cursor on the line in the Chat Window with the left and right arrow keys. If you type over text you will be "typing over text" rather than inserting new text. A ctrl-X typed in the Chat Window will clear the current line. A ctrl-Y typed in the Chat Window will delete the text from the cursor position to the end of the line. The Chat Window features a 20 line Chat History Buffer. This is a circular buffer. You move through previously send line by using the the up and down arrow keys. Using the Chat Window in Compuserve's Conferenicng or CB areas: If the beginning of a line is "/sen nn" (where nn is a "job number") and the line is auto sent before a carriage return is entered, the unsent text will be wrapped to the next line and PREpended with the "/sen nn" from the previous line. This helps prevent embarassing moments if the first /sen line is auto sent and the user neglects to type "/sen nn" on the following line. Sending control characters from the Chat Window to the serial port is sometimes necessary. BackTalk will send ctrl-C, ctrl-O, ctrl-P, ctrl-Q, ctrl-S, and ctrl-Z from the Chat Window to the serial port. All others are ignored. When the Chat Window is active, a gadget labeled /SEN is located on the right side of the bottom status line. When the /SEN gadget is clicked upon a string gadget will appear to it's right. This gadget is used to make it more convenient to have a /SEN converation (private conversation) with someone in CompuServe's Conferencing or CB areas. When the the /SEN gadget is activated and a job number is entered into the string gadget, all lines in the Chat Window will be prepended with "/SEN nn" (where nn is the job number). The state of this item is saved in the BT.CFG file. SubItem: Append "..." Hot Key: Right-Amiga-. (period) This function was decribed in more detail under Global Options. It is another way (that is "hot keyable") to turn on and off the append dots feature of lines auto sent from the Chat Window. When this option is selected a "box" will appear on the far right side of the Chat Window bar (the bar separates the main communications window from the Chat Window). This gives you a visual indication that you have selected the Send Dots feature. The state of this item is saved in the BT.CFG file. SubItem: Double Click XON/XOFF Hot Key: NONE A check marked menu item that toggles on and off the ability to double click the mouse to send an xon/xoff. The state of this item is saved in the BT.CFG file. SubItem: CTRL-U From Chat Hot Key: NONE A check marked menu item that prepends a ^U to all lines sent from the Chat Window. This option is CompuServe specific. If you are using the Chat Window and you are experiencing line noise, a ^U will clear CompuServe's input buffer (get rid of the noise) before you line is sent. The state of this item is saved in the BT.CFG file. SubItem: Save Configuration Hot Key: NONE Selecting this item causes all current user selectable options to be written to the file BT.CFG. This includes the current selection of protocol, colors, fonts, split or full window, 1 bit plane screen, 2 bit plane screen, or workbench screen, modem init and modem exit strings, what window off or on, borders off or on, send dots off or on, all serial parameters -- ANYTHING the user may select or change from the default configuration. NOTE: As of BackTalk 1.30, a version check is made when BT.CFG is read from disk. If your BT.CFG file was written with a version of BackTalk prior to 1.30 you will be presented with a requester informing you that the file format is incompatible. The program will then use the internal default values. However, the next time you use select "Save Configuration" the new file format will be written to disk. This was added in anticipation of future additions to the BT.CFG file. --------------------------------------------------------------------------- Other Features and Functions ARexx: BackTalk has an ARexx port. In the initial release of BackTalk ARexx scripts are not executable from within BackTalk but BackTalk may be controlled externally or internally by an ARexx scripts. Using internal scripts ... When BackTalk is run it attempts to open the ARexx port "REXX". If this port is found an new menu is added, ARexx. Under this menu is one menuitem, "Run ARexx Script...". When this is selected a file requester is presented. The file requester is defaulted to the REXX: directory and only filenames with an extension of .BT are displayed. .BT is the recognized extension for BackTalk specific ARexx scripts. Using external scripts ... Since BackTalk may be run more than once, different iterations of the progrm will have a uniquely named ARexx port. In the first iteration it is named BT_REXX. The second iteration is BT_REXX2, the third is BT_REXX3, etc. Quote all string arguments in your BackTalk ARexx scripts. NOTE: All arguments are case sensitive. Following are the ARexx command currently supported: WAITFOR Usage: WAITFOR This command waits for the string. ARexx is not replied to until this string is found. ONSTRING Usage: ONSTRING Sends a message to ARexx whenever is encountered in the serial input stream. Your ARexx program must open a port named BT_msg. When a match is found, BackTalk will send a message to BT_msg, arg0 will be MATCH. You may embed control characters within . To do so, use the ^ (caret) then the character. (ie, "John^M^J(" will cause the serial input stream to be searched for "John" followed by an 0x0d (^M/carriage return), a 0x0a (^J), and a left parenthesis. If you want to search the input stream for a ^ (caret) itself, use "^^". IE., to search for "2^2" your string would be entered as "2^^2". Each caret to be searched for must be preceeded with another caret so the program knows you really want to search for a caret and not to interpret it as the next character being a control character. NOTE: If you call ONSTRING(n) while an existing ONSTRING(n) command is running you will not add a second string to the search but will change the search string for the currently running iteration of ONSTRING(n). IE., ONSTRING "JOE" (input stream being searched for "JOE") ONSTRING "MOE" (input strean now being searched for "MOE") ANOTHER NOTE: There is only 1 port for BackTalk to send messages to your ARexx script, that being "BT_msg". You should include something like the following in your scripts that use ONSTRING(n) and OFFSTRING(n) in case another script you've got running is already using the port. if ~openport("BT_msg") then do MESSAGE "PORT ALREADY IN USE" exit end If you don't and just assume the port opened without checking the return value, or you ignore the return value and try to use it anyway, all sorts of strange things may happen. The length of the ONSTRINGn/OFFSTRINGn arguments can be up to 64 characters. They are case sensitive. ONSTRING1 Usage: ONSTRING1 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH1. ONSTRING2 Usage: ONSTRING2 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH2. ONSTRING3 Usage: ONSTRING3 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH3. ONSTRING4 Usage: ONSTRING4 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH4. ONSTRING5 Usage: ONSTRING5 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH5. ONSTRING6 Usage: ONSTRING6 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH6. ONSTRING7 Usage: ONSTRING7 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH7. ONSTRING8 Usage: ONSTRING8 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH8. ONSTRING9 Usage: ONSTRING9 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH9. ONSTRING10 Usage: ONSTRING10 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH10. ONSTRING11 Usage: ONSTRING11 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH11. ONSTRING12 Usage: ONSTRING12 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH12. ONSTRING13 Usage: ONSTRING13 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH13. ONSTRING14 Usage: ONSTRING14 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH14. ONSTRING15 Usage: ONSTRING15 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH15. ONSTRING16 Usage: ONSTRING16 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH16. ONSTRING17 Usage: ONSTRING17 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH17. ONSTRING18 Usage: ONSTRING18 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH18. ONSTRING19 Usage: ONSTRING19 Works exactly as described for ONSTRING except the message sent to your ARexx script will be MATCH19. OFFSTRING Usage: OFFSTRING | This causes BackTalk to terminate the ONSTRING command. If an argument is given to OFFSTRING it will be searched for in the serial input string. When found BackTalk will send a message to ARexx which will terminate the ONSTRING command. If no argument is given to OFFSTRING a message will be sent to ARexx immediately to terminate the ONSTRING command. When the message is sent to ARexx it is sent to a port that ARexx has opened named "BT_msg". Arg0 will contain "OFF". You may embed control characters within . To do so, use the ^ (caret) then the character. (ie, "John^M^J(" will cause the serial input stream to be searched for "John" followed by an 0x0d (^M/carriage return), a 0x0a (^J), and a left parenthesis. If you want to search the input stream for a ^ (caret) itself, use "^^". IE., to search for "2^2" your string would be entered as "2^^2". Each caret to be searched for must be preceeded with another caret so the program knows you really want to search for a caret and not to interpret it as the next character being a control character. NOTE: If you give OFFSTRINGn an argument ... The input stream is searched for the argument string. When it is found a message is sent to ARexx and the corresponding ONSTRINGn (it it exists) is cleared. If you change the argument to OFFSTRINGn before a match is found in the input stream, all you have done is changed the search string and NOT cleared the corresponding ONSTRING (if it exists). This means you may do a OFFSTRING "test" if later in your ARexx script you do a OFFSTRING "news" BEFORE a match on "test" is made, you will have changed the search criteria from "test" to "news". If you do NOT give OFFSTRINGn an argument ... A message is sent to ARexx immediately and the corresponding ONSTRINGn (if it exists) is cleared. What this means is that OFFSTRINGn can be used as a "one shot" "signal me when this string is found". Very much like WAITFOR with the exception being that your ARexx script will have to be looking for the message from BackTalk signaling the string was found. (WAITFOR does not reply to ARexx until the string is found and therefore effectively stops further execution of your ARexx script until a match is found). OFFSTRING1 Usage: OFFSTRING1 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF1. OFFSTRING2 Usage: OFFSTRING2 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF2. OFFSTRING3 Usage: OFFSTRING3 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF3. OFFSTRING4 Usage: OFFSTRING4 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF4. OFFSTRING5 Usage: OFFSTRING5 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF5. OFFSTRING6 Usage: OFFSTRING6 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF6. OFFSTRING7 Usage: OFFSTRING7 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF7. OFFSTRING8 Usage: OFFSTRING8 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF8. OFFSTRING9 Usage: OFFSTRING9 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF9. OFFSTRING10 Usage: OFFSTRING10 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF10. OFFSTRING11 Usage: OFFSTRING11 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF11. OFFSTRING12 Usage: OFFSTRING12 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF12. OFFSTRING13 Usage: OFFSTRING13 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF13. OFFSTRING14 Usage: OFFSTRING14 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF14. OFFSTRING15 Usage: OFFSTRING15 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF15. OFFSTRING16 Usage: OFFSTRING16 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF16. OFFSTRING17 Usage: OFFSTRING17 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF17. OFFSTRING18 Usage: OFFSTRING18 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF18. OFFSTRING19 Usage: OFFSTRING19 | Works exactly as described for OFFSTRING except the message sent to your ARexx script will be OFF19. OFFSTRINGALL Usage: OFFSTRINGALL This will clear all outstanding OFFSTRINGn and ONSTRINGn calls. To be used if RESET does too much for your needs. It is HIGHLY recommended you use either OFFSTRINGALL or RESET immediately before exiting your ARexx script if ONSTRINGn and/or OFFSTRINGn were used in the script. RESET Usage: RESET This is recommended to be used immediately before the "exit" command in your ARexx scripts. It will clear all outstanding ONSTRINGn and OFFSTRINGn calls, restore screen display if DISPLAYOFF was called, and UNBLOCK user input if BLOCK was called. The main purpose of this command is to tell BackTalk that the script has terminated and there is no longer any reason to be checking the input stream for matches if you had used ONSTRINGn/OFFSTRINGn. Of course, RESET can be used at any time in an ARexx script if you wish the above actions to take place. SEND Usage: SEND Sends a string to the serial port with a terminating carriage return. If the first character of is a ^ (caret) the following character will immediately be sent as a control character and any text following that 2 character sequence will be ignored. No carriage return is sent after a control character regardless of whether SEND or SENDNCR was used. SENDNCR Usage: SENDNCR The same as SEND however does not send a terminating carriage return MESSAGE Usage: MESSAGE Sends a text message to the screen and to the review buffer but does not send it to the serial port. FKEY Usage: FKEY This will send one of BackTalk's fkey macros returns a non-zero on failure. LMACROS Usage: LMACROS This will load in an alternate set of macros. returns a non-zero on failure. FONT Usage: FONT (ie, FONT "courier" "13") Will load in a new font. If the point size argument is missing no change will be made and an error of "5" will be returned. If the font name cannot be found the font will be changed to Topaz 8 and and error of 10 will be returned. OPENCAPTURE Usage: OPENCAPTURE returns a non-zero on failure. CLOSECAPTURE Usage: CLOSECAPTURE closes the capture file DISPLAYOFF Usage: DISPLAYOFF this turns off screen output. Scrolling, cursor positioning, etc. still takes place, just no text is output to the screen. DISPLAYON Usage: resume text display GETSTRING Usage: GETSTRING | Brings up a string requester and returns the string to ARexx. The argument for this command is the prompt string for the requester. You may remember why the requester popped up requesting input but other users of your script might not. If no argument is given the default text is "Enter your text". An error code of 10 is returned if the requester failed to display. GETFILENAME Usage: GETFILENAME Brings up a file requester and returns the full path to ARexx. If cancel is clicked in the file requester a null string is returned. PROTOCOL Usage: PROTOCOL (ie., PROTOCOL "xprascii") Selects and loads the specified XPR library. The ".library" is not needed in the argument (but nothing is harmed if it's there). If the specified library cannot be loaded for some reason, the xprquickb.library will be loaded. If this is the case an error of 10 will be returned, otherwise the result will be 0. DOWNLOAD Usage: DOWNLOAD The argument the path/name of the file that is written to your computer. If no path/filename argument is given a file requester will be presented for you to enter the path/name. If you select Cancel on the file requester or select USE with no filename selected a non-zero error code will be returned. NOTE: If the protocol selected is an "auto-start" protocol (currently xprquickb and xprzmodem are the only two currently available in XPR format that I know of) this function will return immediately with an error code of 0. If the protocol is not an auto-start protocol this function will return with a 0 after completion of the file transfer. UPLOAD Usage: UPLOAD The argument the path/name of the file that is sent from your computer. If no path/filename argument is given a file requester will be presented for you to enter the path/name. If you select Cancel on the file requester or select USE with no filename selected a non-zero error code will be returned. NOTE: See the NOTE for DOWNLOAD. BAUD Usage: BAUD returns a non-zero on failure. PARITY Usage: PARITY returns a non-zero on failure. DUPLEX Usage: DUPLEX returns a non-zero on failure. DLENGTH Usage: DLENGTH <7 | 8> returns a non-zero on failure. STOPBITS Usage: STOPBITS <1 | 2> returns a non-zero on failure. DEVICENAME Usage: DEVICENAME Should this command fail, the program will read bt.cfg and use those values to reopen the serial port. Of course, this will negate any changes you may have made previously via the PARITY, DUPLEX, DLENGTH, BAUD, and STOPBITS command. UNITNUMBER Usage: UNITNUMBER This command has the same caveat as DEVICENAME. If it fails bt.cfg will be read and the serial port reopened with those values. A strange thing with unit number, tho. Serial.device will allow you to open using unit number 1, so the change is successful altho BackTalk no longer talks to the modem. PRINTERON Usage: PRINTERON turns on echo to printer PRINTEROFF Usage: PRINTEROFF turns off echo to printer BEEP Usage: BEEP Flashes all screens CLEARSCREEN Usage: CLEARSCREEN Clears the communications window. If the Chat Window is present it will clear up to the Chat Bar. BLOCK Usage: BLOCK This function blocks all user input to BackTalk. Block removes the menustrip and ignores all keyboard input. Note: Make sure that you issue either the UNBLOCK command or the QUIT command before the ARexx script ends otherwise you will not be able to communicate at all with BackTalk. UNBLOCK Usage: UNBLOCK Restores the menustrip and again pays attention to keyboard input. SCREENTOBACK Usage: SCREENTOBACK If BackTalk is running in a non-workbench screen, this will push the screen to the back. SCREENTOFRONT Usage: SCREENTOFRONT If BackTalk is running in a non-workbench screen, this will push the screen to the front. HANGUP Usage: HANGUP This command works just like the Hangup menu item. It drops DTR. If CD was never set (dip flipped or using a 3 wire cable) it will wait 60 ticks then send a "+++", delay(60), "ATH\r\n". QUIT Usage: QUIT It does what it says, it will shutdown the program. DOTS Usage: DOTS This is a toggle. If the "Append ..." feature is enabled this will turn it off. If it is not enabled, this will turn it on. BORDER Usage: BORDER This is a toggle. If the window borders are displayed this will remove them. If the borders are not displayed this will a set them. CHAT Usage: CHAT This is a toggle. If the chat window is up, this removes it. If it is not enabled this enables it. CLICK Usage: CLICK This is a toggle. If the "Double Click XON/XOFF" feature is set this turns it off. If it is off, this turns it on. SENDU Usage: SENDU This is a toggle. If the "Preface lines from chat window with ^U" is set this turns it off. If it is off, this turns it on. SPLIT Usage: SPLIT This is a toggle. If you are running on an interlaced system, SPLIT will toggle from full screen display to half screen display and back again. BITPLANE1 Usage: BITPLANE1 Causes BackTalk to be run in a 1 bitplane custom screen. BITPLANE2 Usage: BITPLANE2 Causes BackTalk to be run in a 2 bitplane custom screen. WBWINDOW Usage: WBWINDOW Causes BackTalk to be run in a Workbench window. QSCREEN Usage: QSCREEN Returns the string "SCREEN" or "WORKBENCH" indicating in what screen mode the program is currently running. QSIZE Usage: QSIZE Checks whether the program is running with a half or full sized window. Returns the string "HALF" or "FULL". QLACE Usage: QLACE Checks the interlace flag. Returns the string "ON" or "OFF". QDEPTH Usage: QDEPTH If the program is running on a custom screen, returns, as a string, the number of bit planes. If running in a workbench window, it returns a null string. QFONTNAME Usage: QFONTNAME Returns the name of the currently selected font. QFONTSIZE Usage: QFONTSIZE Returns the size of the currently selected font. QCHAT Usage: QCHAT Returns the "ON" or "OFF" state of chat window. QBORDER Usage: QBORDER Returns the "ON" or "OFF" state of the window borders. QDUPLEX Usage: QDUPLEX Returns the "FULL" or "HALF" state of the duplex. QBAUD Usage: QBAUD Returns the current baud rate. QWLENGTH Usage: QWLENGTH Returns the current word length setting. QSTOPBITS Usage: QSTOPBITS Returns the current stop bit setting. QPARITY Usage: QPARITY Returns the current parity setting, "NONE", "ODD", or "EVEN". QCD Usage: QCD Returns the state of Carrier Detect. Returns the string "ON" if you are online, "OFF" if you aren't. QDEVICENAME Usage: QDEVICENAME Returns the name of the currently seleced serial device. QUNITNUMBER Usage: QUNITNUMBER Returns the currently selected serial device unit number. QPROTOCOL Usage: QPROTOCOL Returns the currently selected XPR protocol. QDOTS Usage: QDOTS Returns the state of "Append ...". "ON" or "OFF". QPIXELS Usage: QPIXELS Returns the currently selected pixel length wrap point. QCAPTURE Usage: QCAPTURE Returns the name of the default capture path/file QDOWNLOAD Usage: QDOWNLOAD Returns the name of the default download path QUPLOAD Usage: QUPLOAD Returns the name of the default upload path QCLICK Usage: QCLICK Returns the current state of the "Double Click XON/XOFF" feature, "ON", or "OFF". QSENDU Usage: QSENDU Returns the current state of the "prepend ^U to chat lines" feature, "ON", of "OFF" QSADDRESS Usage: QSADDRESS If BackTalk is currently running in a custom screen, this returns the hex address of that screen. If the program is running in a workbench window, this command returns a null string. !!!!! IMPORTANT !!!!! In all of your ARexx scripts that call ONSTRINGn and/or OFFSTRINGn, make sure that in your getpkt() loop you've got something similiar to... when arg0 = 'DIE' then do closeport("BT_msg") /* other clean up stuff here */ exit end This is _VERY_ important. If you have an ARexx script running that is waiting for events (currently the only implemented BackTalk ARexx calls that will generate these events are the ONSTRINGn and OFFSTRINGn calls) and you terminate BackTalk, BackTalk will not be able to fully terminate until your ARexx script exits the getpkt() loop. During BackTalk's termination process, it will check if the port BT_msg is open. If it is, BackTalk will send the "DIE" message to BT_msg. It is up to your script to properly exit the getpkt() loop and exit. The termination of the ARexx script will signal BackTalk to complete its termination process. --------------------------------------------------------------------------- Following is an example ARexx script: /* Start BackTalk ARexx script */ options results address command "run BackTalk" waitforport BT_REXX if ~show('l', "rexxsupport.library") then addlib('rexxsupport.library',0,-30,0) address BT_REXX BLOCK QSIZE if result = "FULL" then SPLIT call delay 100 GETSTRING "Enter the phone number to dial" num = result SENDNCR "atmdt " SEND num WAITFOR "CONNECT" call delay 50 SENDNCR "^C" WAITFOR "User ID:" call delay 50 DISPLAYOFF FKEY F2 /* this is an fkey macro, it sends my ppn and password */ /* in the form of 77777,1234\\password */ call delay 100 DISPLAYON FONT "Courier" "13" SEND "G AmigaUser" WAITFOR "Forum !" OPENCAPTURE "ram:testing" SEND "RN" WAITFOR "Forum !" CLOSECAPTURE SEND "BYE" QUIT (More scripts are included in the archive and will likely change from release to release. Remember, scripts ending in .REXX are meant to be run external to BackTalk, those ending in .BT are meant to be run from within BackTalk) --------------------------------------------------------------------------- Scroll Lock: When a ^S is sent to the serial port, a text message, "Scroll Lock On" is displayed on the left side of bottom status line. This is just a visual indication that a ^S has been send and incoming text will not be resumed until a ^Q is sent. Mouse double click: Double clicking the left mouse button sends a ^S to the modem. Double clicking again sends a ^Q. This feature is user selectable via the Configuration menu. The state of this item will be saved in BT.CFG. Hot keyable requesters: All gadget "buttons" in requesters in BackTalk, except for 2 exceptions previously noted, are "hot keyable". Just type the first letter in the name of the gadget. --------------------------------------------------------------------------- Many enhancements are planned for the future. Please don't be shy with enhancement requests and bug reports.