<div>Hi Grant,</div>
<div> </div>
<div>When I first ported this from Win98 to Xp i had a lot of trouble with the newer machines being too fast.</div>
<div> </div>
<div>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.</div>
<div> </div>
<div>Had to slow things down.</div>
<div> </div>
<div>had to try some impossible code like this:</div>
<div> </div>
<blockquote dir="ltr" style="MARGIN-RIGHT: 0px">
<div> // begin samePrepareFaxes<br>//==============================================<br> if samePrepareFaxes.Checked then<br> begin<br> if usefaxcoverpage.Checked then usefaxcover:= faxCoverPage.Text<br>
else usefaxcover:= '';</div>
<div>
<p><br> //stops catching externe application print calls to the apf printer driver<br> faxCatchPrinterDriver := false;<br> main.faxcatchPrinterDriver := false;<br> main.FaxDriverInterfaceFileName :=sameFaxReady
<br> +'Fax All the Same.apf';</p>
<p> //application.HandleMessage;<br> application.ProcessMessages;</p>
<p> processingBorwserDocumentComplete := false;</p>
<p> emailfax.faxDoc.Go(sameFaxPicture.hint);<br> application.ProcessMessages;<br> sleep(200);<br> while processingBorwserDocumentComplete = false do<br>
application.ProcessMessages;</p>
<p> sleep(100);<br> document := emailfax.faxdoc.document as ihtmldocument2;<br> document.body.setAttribute('contenteditable',False,0) ;</p>
<p> //get base HTML for a fax and reuse this html<br> htmlFax:=mshtml_stuff.returnAllHtml(emailfax.faxDoc);</p>
<p> clearFiles(progpath + 'Fax Bodies\Ready\same Ready\fax ready');</p>
<p> fax := stringreplace(htmlFax, contentEditableTrue,contentEditableFalse , [rfignorecase]);<br> { fax := stringreplace(fax,'[**contactfirstname**]', emailfax.processName,[rfreplaceall, rfignorecase]);
<br> fax := processFields ( data.AddressQuery ,fax) ; }</p>
<p><br> application.ProcessMessages;<br> sleep(100);<br> hyperfrm.saveStr( fax, sameFaxReady +'Fax All the Same.htm');<br> sleep(200);
<br> oldIdle := Application.OnIdle;<br> application.OnIdle := NoWaitIdle;</p>
<p> while not fileexists(sameFaxReady +'Fax All the Same.htm')do<br> begin<br> try<br> form1.Show;<br> application.ProcessMessages
;<br> sleep(100);<br> Application.HandleMessage;</p>
<p> finally application.OnIdle := oldIdle; end;<br> end;</p>
<p> processingBorwserDocumentComplete := false;<br> emailfax.faxdoc.Go(sameFaxReady +'Fax All the Same.htm');</p>
<p> oldIdle := Application.OnIdle;<br> application.OnIdle := NoWaitIdle;<br> sleep(200);</p>
<p> while processingBorwserDocumentComplete = false do<br> begin<br> try<br> form1.Show;<br> application.ProcessMessages
;<br> Application.HandleMessage;</p>
<p> finally application.OnIdle := oldIdle; end;<br> end;</p>
<p> faxDriverFinished := false;</p>
<p> main.faxcatchPrinterDriver := false;<br> main.FaxDriverInterfaceFileName :=sameFaxReady<br> +'Fax All the Same.apf';<br> // showmessage(FaxDriverInterface.FileName);</p>
<p> sleep(300);<br> emailFax.faxDoc.Print;<br> application.ProcessMessages;<br> sleep(300);<br> oldIdle :=
Application.OnIdle;<br> application.OnIdle := NoWaitIdle;</p>
<p> while faxDriverFinished = false do<br> begin<br> try<br> form1.Show;<br> application.ProcessMessages
;<br> Application.HandleMessage;</p>
<p> finally application.OnIdle := oldIdle; end;<br> end;</p></div>
<div> </div></blockquote>
<div>===============<br><br> </div>
<div><span class="gmail_quote">On 23/01/06, <b class="gmail_sendername">Grant Brown</b> <<a href="mailto:grant@sitedoc.com.au">grant@sitedoc.com.au</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi James,<br><br>Could you send it to <a href="mailto:grant@sitedoc.com.au">grant@sitedoc.com.au</a><br><br>
Thanks<br>Grant<br><br><br><a href="mailto:jamessugrue@xtra.co.nz">jamessugrue@xtra.co.nz</a> wrote:<br><br>>Yeah I have a demo app I could send.<br>><br>>Just send to sitedoc address ?<br>><br>><br>><br>
_______________________________________________<br>Delphi mailing list<br><a href="mailto:Delphi@ns3.123.co.nz">Delphi@ns3.123.co.nz</a><br><a href="http://ns3.123.co.nz/mailman/listinfo/delphi">http://ns3.123.co.nz/mailman/listinfo/delphi
</a><br></blockquote></div><br>