home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 10: Diskmags / nf_archive_10.iso / MAGS / ST_NEWS / STN_05_2.MSA / PROGRAMS / WOWBAGGR.GFA (.txt) < prev    next >
Encoding:
GFA-BASIC Atari  |  1990-12-02  |  1.8 KB  |  54 lines

  1. ' Wowbagger editor
  2. ' by Richard Karsmakers, September 13th 1990
  3. '
  4. buf%=LPEEK(&H4C2)
  5. IF buf%>3                           !Harddisk attached
  6.   path$="C:\*.*"
  7. ELSE                                !Floppies only
  8.   path$="A:\*.*"
  9. ENDIF
  10. FILESELECT path$,"WOWBAGGR.ACC",lo$
  11. IF lo$=""                           !Cancel
  12.   EDIT
  13. ENDIF
  14. IF EXIST(lo$)                       !File exists
  15.   buf$=SPACE$(2)                    !Buffer
  16.   OPEN "U",#1,lo$                   !Open the file
  17.   SEEK #1,&H3EE6                    !Correct offset for value in minutes
  18.   BGET #1,V:buf$,2                  !Get it out of the file
  19.   CLS
  20.   PRINT "THE CURRENT WAIT TIME IS ";buf$;" MINUTES!"
  21.   INPUT "NEW VALUE FOR THAT (1-99)...";buf$
  22.   buf%=VAL(buf$)                    !Get numeric value
  23.   buf$=STR$(buf%)                   !Convert that back into a string
  24.   IF LEN(buf$)=1                    !Only one character long
  25.     buf$="0"+buf$
  26.   ELSE
  27.     buf$=RIGHT$(buf$,2)             !Get the two right ones
  28.   ENDIF
  29.   SEEK #1,&H3EE6                    !Seek correct offset again
  30.   BPUT #1,V:buf$,2                  !Put new values there
  31.   buf$=SPACE$(1)                    !Erase minutes number
  32.   SEEK #1,&H3EFF                    !Offset for Printer output flag
  33.   BGET #1,V:buf$,1                  !Get the flag (which is Y or N)
  34.   PRINT "THE CURRENT STATUS FOR PRINTER OUTPUT IS ";buf$;"!"
  35.   INPUT "NEW STATUS FOR THAT (Y or N)...";buf$
  36.   buf$=UPPER$(buf$)                 !Make capitals
  37.   SEEK #1,&H3EFF                    !Offset
  38.   IF buf$<>"Y"                      !Enable printer output
  39.     buf$="N"                        !If not "Y" then make it "N"
  40.   ENDIF
  41.   BPUT #1,V:buf$,1                  !Write the new character
  42.   SEEK #1,&H3F0E                    !Offset for Screen output flag
  43.   BGET #1,V:buf$,1                  !Get the flag (which is Y or N)
  44.   PRINT "THE CURRENT STATUS FOR SCREEN OUTPUT IS ";buf$;"!"
  45.   INPUT "NEW STATUS FOR THAT (Y or N)...";buf$
  46.   buf$=UPPER$(buf$)                 !Make capitals
  47.   SEEK #1,&H3F0E                    !Offset
  48.   IF buf$<>"Y"                      !Enable screen output
  49.     buf$="N"                        !If not "Y" then make it "N"
  50.   ENDIF
  51.   BPUT #1,V:buf$,1                  !Write the new character
  52.   CLOSE #1
  53. ENDIF
  54.