Print/Save Anandtech thread - improved method

Discussion in 'Software for Windows' started by Muse, Aug 1, 2002.

  1. Muse

    Muse Lifer

    Joined:
    Jul 11, 2001
    Messages:
    18,075
    Likes Received:
    41
    When you print a long thread on these forums don't you get sick of seeing everybody's signature's... again and again? Here's a function I wrote that deletes all that stuff. You need some version of FoxPro to do this (another dBase derivative would work, maybe with a tweak or two). What you do is click the printer icon - the right-most one at the top right of each post and you will get your printable version of the entire thread. Copy this to your clipboard and then run the FoxPro function I've pasted below. You will then have a version of the thread on your clipboard that doesn't have all those signature lines.

    FUNCTION AT
    * Cut the signature lines out of Anandtech formatted-for-printing threads
    PRIVATE cbuild, cleft, n, ccurrent
    n=1
    cbuild=''
    ccurrent=ALLTRIM(_CLIPTEXT)
    ccurrent=SUBSTR(ccurrent,AT(CHR(13),ccurrent)+1) && Gets rid of the "Print this thread." preamble.
    ccurrent=ALLTRIM(ccurrent)
    DO WHILE SUBSTR(ccurrent,1,1)=CHR(13)
    ccurrent=SUBSTR(ccurrent,2)
    ENDDO
    ccurrent=SUBSTR(ccurrent,1,AT(CHR(13),ccurrent)) + CHR(13) + SUBSTR(ccurrent,AT(CHR(13),ccurrent))
    cleft=ccurrent
    DO WHILE .T.
    cbuild=cbuild + IIF(n>1, '- - - - - - - - - - - - - - - - - - - - - -','') + CHR(13) + ;
    SUBSTR(cleft,1,AT('---------------',cleft)-1)
    cleft=SUBSTR(cleft,AT('Date Posted',cleft,n))
    IF !'Date Posted'$cleft
    EXIT
    ENDIF
    n=n+1
    ENDDO
    cbuild=ALLTRIM(cbuild)+'- - - - - - - - - - - - - - - - - - - - - - - -';
    +CHR(13)+' Original post end.'
    cbuild=STRTRAN(cbuild,CHR(13)+CHR(13)+'Date Posted','- - - - - - - - - - - - - - - - - - - - - -'+CHR(13)+'Date Posted')
    _CLIPTEXT=cbuild
    RETURN
     
  2. Loading...

    Similar Threads - Print Save Anandtech Forum Date
    How can I print Avery 5126 labels for Amazon Returns? Software for Windows Sep 2, 2016
    Does the Acrobat Pro trial download allow you to save and print? Software for Windows Feb 22, 2004
    Spftware App to print\save Directories to text file???? Software for Windows Oct 14, 2002
    InkSaver Review-- This software saves you BIG $$ on your inkjet printing. UP to 75%!! Software for Windows Jun 15, 2002
    SOLVED - save, print, email Software for Windows Apr 2, 2001

  3. Muse

    Muse Lifer

    Joined:
    Jul 11, 2001
    Messages:
    18,075
    Likes Received:
    41
    Anybody tried this?
     
  4. Muse

    Muse Lifer

    Joined:
    Jul 11, 2001
    Messages:
    18,075
    Likes Received:
    41
    This has a bug. I'll debug and post the code. If I can't fix it I'll delete...