///////////////////////////// USAT.SLT //////////////////////////////// // by Dave Appel, 6/23/91. // // Fidonet: Dave Appel at 1:231/30 I X.400 mail: // Internet: dappel@ehsnet.fidonet.org I COUNTRY = US // US Mail: POBox 24802,INDY,IN,46224 I ADMD = WESTERN UNION // Relaynet: Dave Appel at ICC I ORG = DAVID APPEL // GEnie: DAVE.APPEL I DDA.ELN=62877725 // Western Union: ESL 6287-7725 I // // This script will // 1. open the USATODAY door // 2. capture all the articles using menu items #1 through #19. // 3. All captured articles will be logged to the file USATmmdd. Where // 'mm' is the current month, and 'dd' is the current day. // 4. Log you off. // // Then you can read this file with your word processor or LIST.COM. // // If you like this script, send me a "thank-you" message at one // of the above addresses. // ////////////////////////////////////////////////////////////////////////// int stat; int timenow; int monthnow; int daynow; str str_month[2] , str_day[2] , log_file_name[12]; int t1, t2, t3, t4, t5; int tmark; main() { t1 = track ("Command?", 1); t2 = track ("(NS)non-stop?", 1); t3 = track ("Press (Enter) to continue:", 1); itos( tmonth(curtime()) , str_month); // get the month in a string itos( tday(curtime()) , str_day); // get the day in a string log_file_name = "USAT"; if ( tmonth(curtime()) < 10 ) strcat (log_file_name, "0" ); // put in a leading 0 strcat (log_file_name , str_month); // add month to filename if ( tday(curtime()) < 10) strcat (log_file_name, "0" ); // put in a leading 0 strcat (log_file_name , str_day); // add day to filename prints (" "); printsc_trm("^[[7m"); // display filename in reverse printsc ("^m^j Capture file will be:"); // video printsc (log_file_name); printsc_trm("^[[0m"); prints ("."); cputs ("USATODAY^M"); // open the USATODAY door. capture (log_file_name); // capture file is USATmmdd waitfor (" continue:",90); cputs("^M"); stat = track_hit (0); ///////////////////////////////// FILE 1 if (waitfor ("Command?",90)) cputs("1^M"); // select item #1 on menu else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 2 if (waitfor ("Command?",90)) cputs("2^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 3 if (waitfor ("Command?",90)) cputs("3^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 4 if (waitfor ("Command?",90)) cputs("4^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 5 if (waitfor ("Command?",90)) cputs("5^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 6 if (waitfor ("Command?",90)) cputs("6^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 7 if (waitfor ("Command?",90)) cputs("7^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 8 if (waitfor ("Command?",90)) cputs("8^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 9 if (waitfor ("Command?",90)) cputs("9^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 10 if (waitfor ("Command?",90)) cputs("10^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 11 if (waitfor ("Command?",90)) cputs("11^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 12 if (waitfor ("Command?",90)) cputs("12^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 13 if (waitfor ("Command?",90)) cputs("13^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 14 if (waitfor ("Command?",90)) cputs("14^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 15 if (waitfor ("Command?",90)) cputs("15^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 16 if (waitfor ("Command?",90)) cputs("16^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 17 if (waitfor ("Command?",90)) cputs("17^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 18 if (waitfor ("Command?",90)) cputs("18^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ///////////////////////////////// FILE 19 if (waitfor ("Command?",90)) cputs("19^M"); else prints("Error waiting for USATODAY menu."); do_the_more_stuff (); ////////////////////////////////// if (waitfor ("Command?",90)) cputs("G^M"); // log off the bbs else prints("Error waiting for USATODAY menu."); capture ("*CLOSE*"); // close the capture file } //////////////// end of main /////////////////// do_the_more_stuff() { timer_free(tmark); tmark = timer_start (3000); // wait up to 5 minutes while (not time_up (tmark)) { terminal(); stat = track_hit (0); if (stat == t2) { cputs("NS^M"); // Answer "non stop" to the "More:" prompt } else if (stat == t3) { cputs("^M"); break; // "Press (Enter) to continue:" prompt } // This indicates the END of the ARTICLE } if (time_up (tmark)) prints ("^gError in waiting for end of article."); timer_free(tmark); // free up the timer } ///////////////////// end of source for USAT.SLT ////////////////////