Hi Grant,
 
When I first ported this from Win98 to Xp i had a lot of trouble with the newer machines being too fast.
 
If  I was dynamically making the fax document using the APF fax driver, the system would report that the file was ready long beofre it actually was.
 
Had to slow things down.
 
had to try some impossible code like this:
 
     //  begin samePrepareFaxes
//==============================================
   if samePrepareFaxes.Checked then
     begin
          if  usefaxcoverpage.Checked then usefaxcover:= faxCoverPage.Text
                                  else usefaxcover:= '';


          //stops catching externe application print calls to the apf printer driver
          faxCatchPrinterDriver := false;
   main.faxcatchPrinterDriver := false;
  main.FaxDriverInterfaceFileName :=sameFaxReady
                                    +'Fax All the Same.apf';

     //application.HandleMessage;
   application.ProcessMessages;

       processingBorwserDocumentComplete := false;

           emailfax.faxDoc.Go(sameFaxPicture.hint);
                   application.ProcessMessages;
                   sleep(200);
             while processingBorwserDocumentComplete = false do
                  application.ProcessMessages;

                sleep(100);
        document := emailfax.faxdoc.document as ihtmldocument2;
          document.body.setAttribute('contenteditable',False,0)  ;

        //get base HTML for a fax and reuse this html
        htmlFax:=mshtml_stuff.returnAllHtml(emailfax.faxDoc);

       clearFiles(progpath + 'Fax Bodies\Ready\same Ready\fax ready');

   fax :=   stringreplace(htmlFax, contentEditableTrue,contentEditableFalse , [rfignorecase]);
        {                      fax :=        stringreplace(fax,'[**contactfirstname**]', emailfax.processName,[rfreplaceall, rfignorecase]);
                               fax :=  processFields (  data.AddressQuery ,fax) ;   }


                       application.ProcessMessages;
                       sleep(100);
                     hyperfrm.saveStr( fax, sameFaxReady +'Fax All the Same.htm');
                       sleep(200);
                     oldIdle := Application.OnIdle;
                     application.OnIdle := NoWaitIdle;

     while not fileexists(sameFaxReady +'Fax All the Same.htm')do
                    begin
                            try
                             form1.Show;
                             application.ProcessMessages ;
                             sleep(100);
                             Application.HandleMessage;

                            finally  application.OnIdle := oldIdle; end;
                    end;

               processingBorwserDocumentComplete := false;
           emailfax.faxdoc.Go(sameFaxReady +'Fax All the Same.htm');

                     oldIdle := Application.OnIdle;
                     application.OnIdle := NoWaitIdle;
                                 sleep(200);

             while processingBorwserDocumentComplete = false do
                   begin
                            try
                             form1.Show;
                             application.ProcessMessages ;
                             Application.HandleMessage;

                            finally  application.OnIdle := oldIdle; end;
                    end;

             faxDriverFinished := false;

   main.faxcatchPrinterDriver := false;
  main.FaxDriverInterfaceFileName :=sameFaxReady
                                    +'Fax All the Same.apf';
    //     showmessage(FaxDriverInterface.FileName);

                              sleep(300);
                          emailFax.faxDoc.Print;
                        application.ProcessMessages;
                              sleep(300);
                     oldIdle := Application.OnIdle;
                     application.OnIdle := NoWaitIdle;

                       while faxDriverFinished = false do
                    begin
                            try
                             form1.Show;
                             application.ProcessMessages ;
                             Application.HandleMessage;

                            finally  application.OnIdle := oldIdle; end;
                    end;

 
===============

 
On 23/01/06, Grant Brown <[EMAIL PROTECTED]> wrote:
Hi James,

Could you send it to [EMAIL PROTECTED]

Thanks
Grant


[EMAIL PROTECTED] wrote:

>Yeah I have a demo app I could send.
>
>Just send to sitedoc address ?
>
>
>
_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list
[email protected]
http://ns3.123.co.nz/mailman/listinfo/delphi

Reply via email to