BBS: Inland Empire Archive Date: 10-05-92 (15:35) Number: 387 From: SEAN HAWTHORNE Refer#: NONE To: MICHAEL BULL Recvd: NO Subj: *.msg format.. Conf: (2) Quik_Bas
***** Michael Bull sent All this on 03 Oct 92 21:49:00 ***** MB> Anyone have the format for QB45, and if so could they post it? Here is a *.msg utility I wrote a while ago it should give you some info. also look for ftsc0001.* or some such thing on local boards. _ _ _O_/_ _C_U_T_ _H_E_R_E_ _ _ _ _ _ _ _ _ _C_U_T_ _H_E_R_E_ _\_O_ _ _ O \ / O REM REM *** MAILPRNT V2.00 Copyright 1991 Sean Hawthorne *** REM Syntax: Mailprnt *.msg (Wild cards not allowed) REM ON ERROR GOTO errmsg: openmail: TYPE headertype fromname AS STRING * 36 toname AS STRING * 36 subject AS STRING * 72 datetime AS STRING * 20 timesread AS INTEGER destnode AS INTEGER orignode AS INTEGER cost AS INTEGER orignet AS INTEGER destnet AS INTEGER fill AS STRING * 8 replyto AS INTEGER attribute AS INTEGER nextreply AS INTEGER END TYPE DIM header AS headertype DIM messagebyte AS STRING * 1 filename$ = COMMAND$ OPEN filename$ FOR BINARY AS #1 lenght% = LOF(1) - 190 IF lenght% <= 0 THEN GOTO killfile: Getmail: GET #1, 1, header Editsubject: xc = INSTR(header.subject, "Re:") IF xc = 0 THEN subject$ = header.subject GOTO printheader: END IF subject$ = MID$(header.subject, xc + 3, LEN(header.subject) - (xc + 3)) printheader: PRINT "" PRINT STRING$(78, "=") PRINT " Fm:"; header.fromname; TAB(50); header.datetime PRINT " To:"; header.toname PRINT " Re:"; subject$ PRINT STRING$(78, "=") printmessage: messageline$ = "" FOR xd = 1 TO lenght% GET #1, , messagebyte IF messagebyte = CHR$(1) THEN GOSUB stripline: IF messagebyte > CHR$(127) THEN messagebyte = "" IF messagebyte < CHR$(32) AND messagebyte > CHR$(13) THEN messagebyte = "" IF messagebyte < CHR$(13) THEN messagebyte = "" IF messagebyte = CHR$(13) THEN GOSUB printline: messageline$ = messageline$ + messagebyte IF LEN(messageline$) >= 80 THEN GOSUB wordwrap: NEXT xd Closemail: CLOSE #1 PRINT "" PRINT STRING$(19, "="); " MAILPRNT V2.00 (C)1991 Sean Hawthorne "; STRING$(19, "=") END wordwrap: x = 80 i = 0 WHILE i = 0 a$ = MID$(messageline$, x, 1) IF a$ = CHR$(32) THEN i = x x = x - 1 WEND temp$ = messageline$ messageline$ = MID$(temp$, 1, x) GOSUB printline: messageline$ = MID$(temp$, x + 2, LEN(temp$)) RETURN printline: PRINT messageline$ xe = INSTR(messageline$, "* Origin:") IF xe <> 0 THEN GOTO Closemail: messageline$ = "" messagebyte = "" RETURN stripline: WHILE messagebyte <> CHR$(13) GET #1, , messagebyte WEND messagebyte = "" RETURN killfile: CLOSE #1 KILL filename$ PRINT PRINT " Mailprnt V2.00 Copyright 1991 Sean Hawthorne " END errmsg: PRINT "" PRINT "Syntax: MAILPRNT *.msg (Sorry no wildcards)" PRINT "" PRINT "MAILPRNT V2.00 Copyright 1991 Sean Hawthorne" PRINT "" END _ _ _O_/_ _C_U_T_ _H_E_R_E_ _ _ _ _ _ _ _ _ _C_U_T_ _H_E_R_E_ _\_O_ _ _ O \ / O Hope this helps. ... Real programmer's girlfriends wear a G$. --- Blue Wave/Max v2.10 * Origin: TechTalk, Ln1: 280-4938 16.8 DS, Ln2: 285-4168 14.4 HST (1:134/40.0)
Books at Amazon:
Back to BASIC: The History, Corruption, and Future of the Language
Hackers: Heroes of the Computer Revolution (including Tiny BASIC)
Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution
The Advent of the Algorithm: The Idea that Rules the World
Moths in the Machine: The Power and Perils of Programming
Mastering Visual Basic .NET