///////////////////////////////////////////////////////////////// main() { cputs("OPEN 48^M"); // open door 48; replace w/proper door# // translation: put the string "OPEN 48" out the comm. // port (same as typing it manually online...) if (not waitfor("Deluxe Update Door", 120)) return(0); // translation: wait 120 seconds for the string "Deluxe // Update Door" to come in, 'if' it doesn't come in, // return() to 'the caller' (if called from a Custom Command, // 'the caller' is The Liberator). You can break it down to // three SALT functions: if(), waitfor(), and return(). A // return() from main() always ends the current script. while (waitfor("Press any key to continue...", 8)) cputs("^M"); // translation: wait 8 seconds for the string "Press any key to // continue..." to come in, and 'while' the string keeps coming // in, put an (^M) out the communications port. This // can also be broken down to three functions: while(), // waitfor(), cputs(). cputs("ALL^M"); // select ALL files for downloading (Door option) delay_scr(20); // delay for 20/10th's of a second, or 2 seconds cputs("DOWNLOAD^M"); // send the door command to start the download if (waitfor("Begin your Zmodem download now...", 200)) receive('Z', ""); // if the prompt "Begin your Zmodem download now..." comes in // within 200 seconds, then we start the download with the // receive(). Otherwise we ignore the receive and continue // below. See the SALT manual for send/receive protocol // letters. Also note that the Zmodem protocol passes the // filename (the BBS sends it with the file), so we don't have // to specify it in the receive() function--hence the "" where // the filename should be. Receive() continues below when the // download completes... waitfor("Command? ", 10); // pause for 10 seconds or until prompt cputs("QUIT^M"); // then exit the door and... waitfor("Command? ", 120);// waitfor PCBoard prompt to let The // Liberator continue. } /////////////////////////////////////////////////////////////////