IFEXist ======= {COMMO} macro language contains commands for testing various conditions. One purpose for testing a condition is to branch to various segments of your script depending upon the result of the test, i.e., if test result is "X", then branch to segment "A" in script..if test result is "Y", then branch to segment "B" in script, etc.. One "condition" that is applicable to any mailrun script is a test to determine whether or not there are replies to send to the BBS during any given session. Normally, a mailrun script would *always* download new mail. But how do you handle those sessions where you don't have a .REP file to send? What can we do to ensure .REPs are uploaded if there is one, and the upload process is skipped if there isn't a .REP? Let's suppose our intended program flow for our mail send/rec portion of the script is: Received mail door prompt?, upload replies if they exist, otherwise download new mail. If replies exist, upload them first, then continue on with mail download. Here's how that process might look on your flowchart: ------------------------------------------------------------ ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ ³Receive Mail Prompt³ ÀÄÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÙ ÚÄÄÄÄÄÄÄÄvÄÄÄÄÄÄÄÄÄ¿ Yes ÚÄÄÄÄÄÄÄÄÄÄ¿ ³Do I Have Replies?ÃÄÄÄÄÄÄ> Send "U" ³ ÀÄÄÄÄÄÄÄÄÂÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÂÄÄÄÄÄÙ ³ No ÚÄÄÄÄvÄÄÄÄÄ¿ ³ ³ Protocol ³ ³ ³ Startup ³ ³ ³ String ³ ³ ÀÄÄÄÄÂÄÄÄÄÄÙ ³ ÚÄÄÄÄvÄÄÄÄÄÄ¿ ³ ³ Exec Prot ³ ³ ÀÄÄÄÄÂÄÄÄÄÄÄÙ ³ ÚÄÄÄÄvÄÄÄÄÄÄ¿ ³ ³ Mail Prmpt³ ³ ÀÄÄÄÄÂÄÄÄÄÄÄÙ ÚÄÄÄÄvÄÄÄ¿ ³ ³Send "D"<ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ ÀÄÄÄÄÄÄÄÄÙ ------------------------------------------------------------ IFEXist will be the command that will answer the "Do I have replies" question and will branch to the "Send U" or "Send D" segment depending upon the answer. Here's how the coded segment might look: . . {LOOK Mail Command?} {IFEX %repdir%%bbsid.rep,send_u,send_d} {:SEND_U} {SEND u|} {LOOK ^xB01} (assuming ZModem is the protocol we use on this BBS) {EXEC %zprog port %_por rz %qwkdir} {LOOK Mail Command?} {:SEND_D} {SEND d|} . . End of Lesson 10. If you'd like something to ponder until next lesson, the following alternative coding to the segment above accomplishes the same thing, but contains a half-subtle method for eliminating unnecessary labels in your script. Can you determine how/why? . . {LOOK Mail Command?} {IFEX %repdir%%bbsid.rep,,send_d} {SEND u|} {LOOK ^xB01} (assuming ZModem is the protocol we use on this BBS) {EXEC %zprog port %_por rz %qwkdir} {LOOK Mail Command?} {:SEND_D} {SEND d|} . . Jim