home *** CD-ROM | disk | FTP | other *** search
/ PSION CD 2 / PsionCDVol2.iso / Programs / 952 / SaveMailER3forMacro5.sis / SaveMail.opl (.txt) < prev    next >
Encoding:
EPOC OPL Source  |  2000-10-05  |  15.1 KB  |  589 lines

  1.  
  2.  
  3. REM Macro SaveMail (for Epoc Release 3)
  4.  
  5. REM To be used with Macro5 (from v2.37)
  6. REM and a Psion S5 or Geofox + MsgSuite Email (v1.52)
  7. REM by S.Alisi - sergioalisi@geocities.com
  8. REM http://www.geocities.com/siliconvalley/bridge/1492
  9.  
  10. INCLUDE "Systinfo.oxh"
  11.  
  12. CONST AppName$="SaveMail"
  13. CONST AppVersion$=" v2.51 ER3"
  14. CONST DataUID&=&10000086
  15. CONST WordUID&=&1000007F
  16. CONST EmailUID&=&10000162
  17. CONST IniFile$="C:\System\SaveMail.ini"
  18. CONST SourceBoxName$="SaveMail.box"
  19.  
  20. PROC Main:
  21.     GLOBAL Email$(255),Data$(255)
  22.     GLOBAL EmailRSC$(255),DataRSC$(255)
  23.     GLOBAL MultiBox%,UserDialog%,DateFormat&,MacroNew%
  24.     GLOBAL TotMsg&,NumMsg%,NoSubj%,DelMsg%,PasteToWord%,Skip%,TotSkip%
  25.     GLOBAL Date$(30),From$(250),To$(250)
  26.     GLOBAL CC$(250),BCC$(250),Subject$(250),Body$(250)
  27.  
  28.     Macro5Test:
  29.     TotMsg&=1 :NumMsg%=1
  30.     if IniSetup%: :return :endif
  31.     if StartEmail%: :return :endif
  32.     GetFocus:
  33.     if MultiBox%
  34.         if MultiBoxProc%:(1) :return :endif
  35.     endif
  36.     if UserDialog%
  37.         if UserDialogProc%: :return :endif
  38.     endif
  39.     StartData:
  40.     while NumMsg%<=TotMsg&
  41.         CopyFromEmail:
  42.         AdjustDate:
  43.         AdjustFields:
  44.         if PasteToWord%
  45.             PasteToWord:
  46.         else
  47.             PasteToData:
  48.         endif
  49.         Report:
  50.     endwh
  51. ENDP
  52.  
  53. PROC Macro5Test:
  54.     rem check if SaveMail is launched from Macro5 and as a macro
  55.     onerr No_Macro::
  56.     Email$=GetApp$:(EmailUID&)
  57.     return
  58.     No_Macro::
  59.     onerr off
  60.     alert(AppName$+AppVersion$,"To be launched as a macro with Macro5")
  61.     stop
  62. ENDP
  63.  
  64. PROC Macro5Ver:
  65.     rem check which version of Macro5 is currently installed
  66.     onerr Old_Macro::
  67.     if LibVersion%: >=240
  68.         MacroNew%=-1
  69.         return
  70.     endif
  71.     Old_Macro::
  72.     onerr off
  73.     MacroNew%=0
  74. ENDP
  75.  
  76. PROC IniSetup%:
  77.     LOCAL s0%,s1%,s2%,s3%
  78.     Start::
  79.     if not exist (IniFile$)
  80.         if Email$=""
  81.             alert(AppName$+AppVersion$,"Sorry, I can't find Email.app")
  82.             return -1
  83.         endif
  84.         EmailRSC$=Left$(Email$,Len(Email$)-3)+"rsc"
  85.         Data$="*"+Right$(SourceBoxName$,4)
  86.         DataRSC$="Z:\System\Apps\Data\Data.rsc"    rem for Psion S5
  87.         if not exist (DataRSC$)
  88.             DataRSC$="Z:\System\Apps\Data\Data.ruk"    rem for Geofox
  89.             if not exist (DataRSC$)
  90.                 alert(AppName$+AppVersion$,"Sorry, I can't find Data.rsc/ruk")
  91.                 return -1
  92.             endif
  93.         endif
  94.         rem the following line finds the Date Format of your machine
  95.         SIDateFormat:(DateFormat&, s0%, s1%, s2%, s3%)
  96.         dinit AppName$+" Setup (step 1 of 3) ..."
  97.         dtext "","- your Email program is located on drive "+Left$(Email$,1)
  98.         if DateFormat&=0
  99.             dtext "","- your System Date format is ""mm"+chr$(s1%)+"dd"+chr$(s2%)+"yyyy"""
  100.         elseif DateFormat&=1
  101.             dtext "","- your System Date format is ""dd"+chr$(s1%)+"mm"+chr$(s2%)+"yyyy"""
  102.         elseif DateFormat&=2
  103.             dtext "","- your System Date format is ""yyyy"+chr$(s1%)+"mm"+chr$(s2%)+"dd"""
  104.         endif
  105.         Macro5Ver:
  106.         if MacroNew%
  107.             dtext "","- your Macro5 version is "+gen$(LibVersion%:/100,2)+"."+right$(gen$(LibVersion%:,4),2)
  108.         else
  109.             dtext "","- SaveMail is not tested with Macro5 versions prior to 2.37"
  110.         endif
  111.         dbuttons "Cancel",27,"Continue",13
  112.         if dialog
  113.         else
  114.             IniResult%:(-1)
  115.             return -1
  116.         endif
  117.         if MultiBoxProc%:(0)
  118.             IniResult%:(-1)
  119.             return -1
  120.         endif
  121.         dinit AppName$+" Setup (step 3 of 3)"
  122.         dtext "","Each time you launch SaveMail you can ..."
  123.         dcheckbox MultiBox%,"1) have a choice of the target Data file"
  124.         dtext "","2) open a dialog window to automate the process"
  125.         dcheckbox UserDialog%,"of storing/deleting a group of messages"
  126.         dbuttons "Cancel",27,"Continue",13
  127.         if dialog
  128.         else
  129.             IniResult%:(-1)
  130.             return -1
  131.         endif
  132.         create IniFile$,a,Email$,EmailRSC$,Data$,DataRSC$,MultiBox%,UserDialog%,DateFormat&,MacroNew%
  133.         a.Email$=Email$
  134.         a.EmailRSC$=EmailRSC$
  135.         a.Data$=Data$
  136.         a.DataRSC$=DataRSC$
  137.         a.MultiBox%=MultiBox%
  138.         a.UserDialog%=UserDialog%
  139.         a.DateFormat&=DateFormat&
  140.         a.MacroNew%=MacroNew%
  141.         append
  142.         close
  143.         IniResult%:(0)
  144.         return -1
  145.     else
  146.         onerr Wrong_ini::
  147.         open IniFile$,a,Email$,EmailRSC$,Data$,DataRSC$,MultiBox%,UserDialog%,DateFormat&,MacroNew%
  148.         Email$=a.Email$
  149.         EmailRSC$=a.EmailRSC$
  150.         Data$=a.Data$
  151.         DataRSC$=a.DataRSC$
  152.         MultiBox%=a.MultiBox%
  153.         UserDialog%=a.UserDialog%
  154.         DateFormat&=a.DateFormat&
  155.         MacroNew%=a.MacroNew%
  156.         onerr off
  157.         close
  158.     endif
  159.     return
  160.     Wrong_ini::
  161.     dinit AppName$+AppVersion$
  162.     dtext "","Problem reading your SaveMail.ini file!"
  163.     dtext "","Relaunch the Setup procedure?"
  164.     dtext "","(you will loose your old settings)"
  165.     dbuttons "Cancel",27,"Continue",13
  166.     if dialog
  167.         delete IniFile$
  168.         goto Start::
  169.     else
  170.         return -1
  171.     endif
  172. ENDP
  173.  
  174. PROC IniResult%:(Type%)
  175.     dinit AppName$+AppVersion$
  176.     if Type%=-1    rem Setup aborted
  177.         dtext "","Setup aborted..."
  178.         dtext "","Relaunch the macro to complete"
  179.     else    rem Setup completed
  180.         dtext "","Setup successfully completed..."
  181.         dtext "","Now you can relaunch the macro"
  182.     endif
  183.     dbuttons "Continue",13
  184.     dialog
  185. ENDP
  186.  
  187. PROC StartEmail%:
  188.     if MacroNew%    rem Macro5 v2.40 or later installed
  189.         busy "Opening Email, please wait ...",3,1
  190.         if (FgApp%:(Email$))=1
  191.             SendRscMenu:(EmailRSC$,4,&1008)    rem switch to inbox ("Shift+Ctrl+i" for UK/USA)
  192.             busy off
  193.             GetFocus:
  194.             alert("SaveMail has opened your Email program...","Now highlight an Inbox/Sent message and relaunch")
  195.             return -1
  196.         endif
  197.         busy off
  198.     else    rem Macro5 v2.37 installed
  199.         if (FgApp%:(Email$))=1
  200.             GetFocus:
  201.             giprint "Opening Email, please wait..."
  202.             pause 90
  203.             SendRscMenu:(EmailRSC$,4,&1008)    rem switch to inbox ("Shift+Ctrl+i" for UK/USA)
  204.             alert("SaveMail is opening Email program...","Highlight an Inbox/Sent message and relaunch")
  205.             return -1
  206.         endif
  207.     endif
  208. ENDP
  209.  
  210. PROC StartData:
  211.     if MacroNew%=0    rem Macro5 v2.37 installed
  212.         if (FgApp%:(Data$))=1
  213.             GetFocus:
  214.             giprint "Opening MailBox file, please wait..."
  215.             pause 150
  216.         endif
  217.         FgApp%:(Email$)
  218.     endif
  219. ENDP
  220.  
  221. PROC MultiBoxProc%:(Type%)
  222.     LOCAL Button%
  223.     Start::
  224.     if Type%=1    rem call from Main: procedure
  225.         open IniFile$,a,Email$,EmailRSC$,Data$,DataRSC$,MultiBox%,UserDialog%,DateFormat&,MacroNew%
  226.         Data$=a.Data$
  227.         close
  228.         dinit AppName$+AppVersion$,16
  229.         dtext "","Select the location of your target Data file:"
  230.     else    rem call from IniSetup%: procedure
  231.         dinit AppName$+" Setup (step 2 of 3) ..."
  232.         dtext "","Select the location of your default Mailbox Data file:"
  233.     endif
  234.     dfile Data$,"File,Folder,Disk",128+8+32,0,0,DataUID&
  235.     dtext "or choose ...","'New' to create a new Mailbox Data file"
  236.     if Type%=1
  237.         dtext "...","'Word' to store to a Psion Word file"
  238.         dtext "...","'Setup' to relaunch the Setup procedure"
  239.         dbuttons "New",%N,"Word",%W,"Setup",%S,"Cancel",27,"Continue",13
  240.     else
  241.         dbuttons "New",%N,"Cancel",27,"Continue",13
  242.     endif
  243.     Button%=dialog
  244.     if Button%=13
  245.         if Data$=""
  246.             giprint "No target file selected"
  247.             goto Start::
  248.         endif
  249.     elseif Button%=%s
  250.         dinit AppName$+AppVersion$
  251.         dtext "","Relaunch the Setup procedure?"
  252.         dtext "","(you will loose the current settings)"
  253.         dbuttons "Cancel",27,"Continue",13
  254.         if dialog
  255.             delete IniFile$
  256.             if IniSetup%: :return -1 :endif
  257.         else
  258.             Data$=Right$(SourceBoxName$,4)
  259.             goto Start::
  260.         endif
  261.     elseif Button%=%n
  262.         if NewData%:(Type%) :goto Start:: :endif
  263.     elseif Button%=%w
  264.         if UseWord%: :goto Start:: :endif
  265.     else
  266.         return -1
  267.     endif
  268.     giprint "Target file is "+Data$
  269.     pause 20
  270. ENDP
  271.  
  272. PROC NewData%:(Type%)
  273.     LOCAL SetDefault%,SourceBox$(255)
  274.     SourceBox$=Macros$+SourceBoxName$
  275.     if exist (SourceBox$)
  276.         Data$=Right$(SourceBoxName$,4)
  277.         dinit AppName$+AppVersion$
  278.         dtext "","Create new MailBox Data file:"
  279.         dfile Data$,"File,Folder,Disk",1+8
  280.         if Type%=1
  281.             dcheckbox SetDefault%,"Set as default"
  282.         endif
  283.         dbuttons "Cancel",27,"Continue",13
  284.         if dialog
  285.             copy SourceBox$,Data$
  286.             if SetDefault% and Type%=1
  287.                 open IniFile$,a,Email$,EmailRSC$,Data$,DataRSC$,MultiBox%,UserDialog%,DateFormat&,MacroNew%
  288.                 a.Data$=Data$
  289.                 update
  290.                 close
  291.             endif
  292.         else
  293.             return -1
  294.         endif
  295.     else
  296.         giprint "NEW option not available"
  297.         Data$=Right$(SourceBoxName$,4)
  298.         return -1
  299.     endif
  300. ENDP
  301.  
  302. PROC UseWord%:
  303.     LOCAL Button%
  304.     Start::
  305.     Data$=""
  306.     dinit AppName$+AppVersion$
  307.     dtext "","Select an existing Word file:"
  308.     dfile Data$,"File,Folder,Disk",128+8+32,0,0,WordUID&
  309.     dtext "or choose ...","'New' to create a new empty one"
  310.     dbuttons "New",%N,"Cancel",27,"Continue",13
  311.     Button%=dialog
  312.     if Button%=13
  313.         if Data$=""
  314.             giprint "No target file selected"
  315.             goto Start::
  316.         else
  317.             UseDoc%:("Word",Data$,3)    rem open in background
  318.             pause 20
  319.             PasteToWord%=-1
  320.             FgApp%:(Email$)
  321.             GetFocus:
  322.         endif
  323.     elseif Button%=%n
  324.         Data$=""
  325.         dinit AppName$+AppVersion$
  326.         dtext "","Create a new Word file:"
  327.         dfile Data$,"File,Folder,Disk",1+8
  328.         dbuttons "Cancel",27,"Continue",13
  329.         if dialog
  330.             UseDoc%:("Word",Data$,1)    rem create new word file
  331.             pause 20
  332.             PasteToWord%=-1
  333.             FgApp%:(Email$)
  334.             GetFocus:
  335.         else
  336.             goto Start::
  337.         endif
  338.     else
  339.         return -1
  340.     endif
  341. ENDP
  342.  
  343. PROC UserDialogProc%:
  344.     LOCAL Button%
  345.     dinit AppName$+AppVersion$
  346.     dlong TotMsg&,"Number of messages to store",1,100
  347.     dtext "","(starting from the highlighted one and going down)",$200
  348.     dcheckbox NoSubj%,"Highlighted message has no subject"
  349.     dtext "","(this option forces one single message storing)",$200
  350.     dcheckbox DelMsg%,"Delete original message from Email"
  351.     dtext "","(use with care, don't forget to save attachments...)",$200
  352.     dbuttons "Cancel",27,"Continue",13
  353.     if dialog
  354.         if NoSubj%=-1 :TotMsg&=1 :endif
  355.     else
  356.         return -1
  357.     endif
  358.     if DelMsg%
  359.         dinit "Please read carefully:"
  360.         dtext "","You have chosen the ""Auto-Delete"" option, so:"
  361.         dtext "","- DO NOT touch the keyboard and"
  362.         dtext "","- DO NOT switch to any other program"
  363.         dtext "","while the macro is running, as this could also lead to"
  364.         dtext "","the loss of all your messages...",$200
  365.         dtext "","A dialog box will inform you when the task has ended."
  366.         dbuttons "Disable",%D,"Abort",27,"Continue",13
  367.         Button%=dialog
  368.         if Button%=%d
  369.             DelMsg%=0
  370.             giprint """Auto-Delete"" option disabled"
  371.             pause 20
  372.         elseif Button%<>13
  373.             return -1
  374.         endif
  375.     endif
  376. ENDP
  377.  
  378. PROC CopyFromEmail:
  379.     LOCAL Dummy$(255)
  380.     FgApp%:(Email$)
  381.     SendKey:("Enter")    rem open the message
  382.     pause 50
  383.     SendKey:("Fn+Up")    rem move to DATE field
  384.     SendRscMenu:(EmailRSC$,4,&125)    rem select all ("Ctrl+a" for UK/USA)
  385.     Date$=Copy$:
  386.     if Date$=""    rem message is a fax
  387.         Skip%=-1
  388.         TotSkip%=TotSkip%+1
  389.     else
  390.         SendKey:("Right,Down")    rem move to FROM field
  391.         SendRscMenu:(EmailRSC$,4,&125)    rem select all
  392.         Dummy$=Copy$:
  393.         From$=Left$(Dummy$,250)
  394.         SendKey:("Right,Down")    rem move to TO field
  395.         SendRscMenu:(EmailRSC$,4,&125)    rem select all
  396.         Dummy$=Copy$:
  397.         To$=Left$(Dummy$,250)
  398.         SendKey:("Right,Down")    rem move to CC field
  399.         SendRscMenu:(EmailRSC$,4,&125)    rem select all
  400.         Dummy$=Copy$:
  401.         CC$=Left$(Dummy$,250)
  402.         SendKey:("Right,Down")    rem move to BCC field
  403.         SendRscMenu:(EmailRSC$,4,&125)    rem select all
  404.         Dummy$=Copy$:
  405.         BCC$=Left$(Dummy$,250)
  406.         SendKey:("Right,Down")    rem move to SUBJECT field
  407.         SendRscMenu:(EmailRSC$,4,&125)    rem select all
  408.         Dummy$=Copy$:
  409.         Subject$=Left$(Dummy$,250)
  410.         SendKey:("Right,Fn+Down,Fn+Down")    rem move to BODY field
  411.         SendRscMenu:(EmailRSC$,4,&125)    rem select all
  412.         pause 20
  413.         Dummy$=Copy$:
  414.         Body$=Left$(Dummy$,250)
  415.         SendKey:("Ctrl+c")    rem this copies more than 255 chars
  416.     endif
  417.     SendKey:("Esc")    rem close message
  418.     pause 20
  419. ENDP
  420.  
  421. PROC AdjustDate:
  422.     rem the following code simply changes the
  423.     rem DATE format used in Email (it depends on
  424.     rem the System settings) to "yyyy/mm/dd hh:mm:ss"
  425.     rem to have messages properly sorted by date
  426.     LOCAL D$(4),M$(4),Y$(4)
  427.     if Skip% :return :endif
  428.     if DateFormat&=0    rem mm/dd/yyyy
  429.         D$=Mid$(Date$,3,3)
  430.         M$=Mid$(Date$,3,1)+Left$(Date$,2)
  431.         Y$=Mid$(Date$,7,4)
  432.         Date$=Right$(Date$,Len(Date$)-10)
  433.         Date$=Y$+M$+D$+Date$
  434.     elseif DateFormat&=1    rem dd/mm/yyyy
  435.         D$=Left$(Date$,2)
  436.         M$=Mid$(Date$,3,4)
  437.         Y$=Mid$(Date$,7,4)
  438.         Date$=Right$(Date$,Len(Date$)-10)
  439.         Date$=Y$+M$+D$+Date$
  440.     endif
  441. ENDP
  442.  
  443. PROC AdjustFields:
  444.     rem the following code rearranges the copied fields
  445.     if Skip% :return :endif
  446.     if NoSubj%
  447.         Subject$="< no subject >"
  448.     elseif Subject$="" or Subject$=Body$
  449.         if BCC$="" or BCC$=Body$
  450.             Subject$=CC$ :CC$="" :BCC$=""
  451.         else
  452.             Subject$=BCC$ :BCC$=""
  453.         endif
  454.     endif
  455. ENDP
  456.  
  457. PROC PasteToData:
  458.     FgApp%:(Data$)
  459.     pause 20
  460.     if NumMsg%=1    rem first message (or single message) to store
  461.         SendRscMenu:(DataRSC$,4,&D)    rem new entry ("Ctrl+Shift+n" for UK/USA)
  462.     endif
  463.     pause 20
  464.     if Skip%<>-1
  465.         SendKey:("Tab,Tab,Tab,Tab,Tab")    rem move to BODY field
  466.         SendKey:("Ctrl+v")
  467.         pause 20
  468.         SendKey:("Shift+Tab")    rem move to CC/BCC field
  469.         Paste:(CC$+Chr$(013)+BCC$)    rem Chr$(013)=carriage return
  470.         pause 20
  471.         SendKey:("Shift+Tab")    rem move to TO field
  472.         if To$<>""
  473.             Paste:(To$)
  474.         endif
  475.         pause 20
  476.         SendKey:("Shift+Tab")    rem move to FROM field
  477.         Paste:(From$)
  478.         pause 20
  479.         SendKey:("Shift+Tab")    rem move to DATE field
  480.         Paste:(Date$)
  481.         pause 20
  482.         SendKey:("Shift+Tab")    rem move to TITLE field
  483.         if Subject$<>""
  484.             Paste:(Subject$)
  485.         endif
  486.         pause 20
  487.         SendRscMenu:(DataRSC$,4,&16)    rem save message ("Ctrl+s" for UK/USA)
  488.     endif
  489.     if NumMsg%=TotMsg&    rem last message (or single message) stored
  490.         SendKey:("Esc")    rem exit from "new entry mode"
  491.     endif
  492. ENDP
  493.  
  494. PROC PasteToWord:
  495.     if Skip% :return :endif
  496.     FgApp%:(Data$)
  497.     pause 20
  498.     SendRscMenu:(DataRSC$,4,&125)    rem select all ("Ctrl+a" for UK/USA)
  499.     SendKey:("Left,Enter")
  500.     pause 20
  501.     SendKey:("Ctrl+v")
  502.     SendKey:("Enter")
  503.     Paste:("************ end of message ************")
  504.     SendKey:("Enter")
  505.     SendRscMenu:(DataRSC$,4,&125)    rem select all ("Ctrl+a" for UK/USA)
  506.     SendKey:("Left,Enter")
  507.     pause 20
  508.     if Subject$<>""
  509.         SendKey:("Enter")
  510.         Paste:("* Subject: "+Subject$)
  511.         pause 20
  512.     endif
  513.     SendKey:("Enter")
  514.     Paste:("* Date: "+Date$)
  515.     pause 20
  516.     if Subject$<>""
  517.         SendKey:("Enter")
  518.         Paste:("* From: "+From$)
  519.         pause 20
  520.     endif
  521.     if To$<>""
  522.         SendKey:("Enter")
  523.         Paste:("* To: "+To$)
  524.     endif
  525.     pause 20
  526.     if CC$<>"" or BCC$<>""
  527.         SendKey:("Enter")
  528.         Paste:("* CC/BCC:"+CC$+Chr$(013)+BCC$)    rem Chr$(013)=carriage return
  529.     endif
  530.     SendKey:("Enter")
  531.     Paste:("* Body:")
  532.     pause 20
  533.     SendRscMenu:(DataRSC$,4,&125)    rem select all ("Ctrl+a" for UK/USA)
  534.     pause 10
  535.     SendKey:("Left")
  536. ENDP
  537.  
  538. PROC Report:
  539.     GetFocus:
  540.     if Len(To$)=250 or Len(CC$)=250 or Len(BCC$)=250
  541.         dinit AppName$+" warning"
  542.         dtext "","Check if the last saved message contains one of"
  543.         dtext "","the To/CC/BCC fields exceeding the 250 chars limit"
  544.         if TotMsg&>1
  545.             NumMsg%=TotMsg&
  546.             dtext "","The message storing procedure has been stopped..."
  547.         endif
  548.         if DelMsg%
  549.             dtext "","The original message won't be deleted from┬áEmail"
  550.         endif
  551.         dbuttons "Continue",13
  552.         dialog
  553.         SendKey:("Esc")    rem exit from "new entry mode" (if necessary)
  554.     else
  555.         if Skip%
  556.             giprint "Message NOT stored"
  557.         elseif TotMsg&>1    rem storing a group of messages
  558.             giprint "Message "+gen$(NumMsg%,3)+" of "+gen$(TotMsg&,3)+" stored"
  559.         else
  560.             giprint "New message stored"
  561.         endif
  562.         pause 20
  563.         FgApp%:(Email$)
  564.         pause 20
  565.         if DelMsg% and Skip%<>-1
  566.             Sendkey:("Del")    rem delete current message
  567.             SendRscButton:("z:\System\Data\Eikon.rsc",308,2)    rem confirm deletion with "Yes" button
  568.             pause 20
  569.         else
  570.             SendKey:("Down")    rem move down to the next message
  571.         endif
  572.         if NumMsg%=TotMsg& and (TotMsg&>1 or DelMsg% or Skip%)    rem last message of a group
  573.             GetFocus:
  574.             dinit AppName$+AppVersion$
  575.             if TotSkip%>0
  576.                 dtext "","Unable to store "+gen$(TotSkip%,3)+" message(s)",$200
  577.             endif
  578.             dtext "",gen$(TotMsg&-TotSkip%,3)+" message(s) successfully stored to:"
  579.             dtext "",Data$
  580.             dbuttons "Continue",13
  581.             dialog
  582.         endif
  583.     endif
  584.     NumMsg%=NumMsg%+1
  585.     Skip%=0
  586. ENDP
  587.  
  588.  
  589.