SCRIPT ' *************************************************************** ' Description: Detect and forward weather bulletins. The WX file ' is written to a directory on the PC with the ' format WXyymmddhhmmss.TXT (example). Loop ' continuously on the check ' NOTE!!! The TNCs and BBSs assigned to the TNC and BBS variables ' must be previously set up in Outpost from the ' Setup > TNC and Setup > BBS forms. ' Author: Jim KN6PE ' Revision: 10/09/08: Original ' ' *************************************************************** Var fname as string ' variable holding the file name and path Var nameonly as string ' variable holding the file name only BEGIN TNC = "GARAGE-TNC" ' use this TNC for all runs. This ' TNC must be set up in Outpost first ' Define the BBS that we will use BBS = "K6FB-2" MYCALL = "KN6PE" RETRIEVE = "PF" ' retrieve Private and selective bulletins FILTER = "WX" ' for Filtered, only get WX messages LOOP ' Check if one or more files matching this mask exist FindFile("c:\data\WX*.txt") ' reload the file mask ' Get the first file. Fname will contain a file name if one exists Fname = NextFile(0) ' Finally, check if a file exists WHILE Exists(FNAME) = TRUE ' if the file exists, create a message and post it BBS="K6FB-2"; FROM="KN6PE"; TO="ALLCTY"; MTYPE = "BULLETIN" ' Put the file name (not entire path) in the subject line as well NAMEONLY = GetFileName(FNAME) SUBJECT="WX Bulletin: " & NAMEONLY MESSAGE=READFILE(FNAME) CREATEMESSAGE ' We could either delete or move it; lets move it so we don't detect it again MOVEFILE(FNAME, "c:\data\sent") ' Finally, get the next file name and repeat this all over again FNAME = NextFile(0) ' Add a line separator to the output for readability Print("----------------------") ENDWHILE SENDRECEIVE ' do this regardless if we found a file PAUSE(300) ' Pause 5 minutes (5*60=300) between checks ENDLOOP END