home *** CD-ROM | disk | FTP | other *** search
/ SPACE 2 / SPACE - Library 2 - Volume 1.iso / apps / 44 / applic / pmmerge.bas < prev    next >
Encoding:
BASIC Source File  |  1986-08-15  |  1.5 KB  |  37 lines

  1. 10    fullw 2:clearw 2:gotoxy 15,0:close
  2. 20    ? "PRINTMASTER FILE MERGE by TCB":?
  3. 30    ? "Graphics from the input file will be added to the output file."
  4. 40    ? "The output file will be created if it does not exist.":?
  5. 50    ? " Input library:";:input inlib$
  6. 60    ? "Output library:";:input outlib$:?
  7. 70    ? "select (A)ll or (S)ome graphics? ";
  8. 80    select$=chr$(inp(2))
  9. 90    if select$="a" or select$="A" then select$="a":goto 110
  10. 100   if select$="s" or select$="S" then select$="s":goto 110
  11. 105   goto 80
  12. 110   ? select$:insdr$=inlib$+".sdr":inshp$=inlib$+".shp"
  13. 120   open "R",#1,insdr$,16
  14. 125   field #1,16 as ingrname$
  15. 130   open "R",#2,inshp$,578
  16. 140   field #2,128 as i1$,128 as i2$,128 as i3$,128 as i4$,66 as i5$
  17. 150   outsdr$=outlib$+".sdr":outshp$=outlib$+".shp"
  18. 160   open "R",#3,outsdr$,16
  19. 165   field #3,16 as outgrname$
  20. 170   open "R",#4,outshp$,578
  21. 180   field #4,128 as o1$,128 as o2$,128 as o3$,128 as o4$,66 as o5$
  22. 190   records=lof(1):outcntr=lof(3)
  23. 200   for incntr=1 to records
  24. 210   get #1,incntr
  25. 220   if select$="a" then ? "Adding ";ingrname$;" to ";outlib$:goto 270
  26. 230   ? "Add ";ingrname$;" to ";outlib$;" ?";
  27. 240   pick$=chr$(inp(2)):if pick$="y" or pick$="Y" then ? pick$:goto 270
  28. 250   if pick$="n" or pick$="N" then ? pick$:goto 310
  29. 260   goto 240
  30. 270   lset outgrname$=ingrname$
  31. 275   outcntr=outcntr+1:put #3,outcntr
  32. 280   get #2,incntr
  33. 290   lset o1$=i1$:lset o2$=i2$:lset o3$=i3$:lset o4$=i4$:lset o5$=i5$
  34. 300   put #4,outcntr
  35. 310   next incntr
  36. 320   close:end
  37. əəəəəəəəəəəəəəəəəəəəə