I endorse the use of the DONE string. Many times (typically when mixing
technologies), they aren't handshaking very well.

I'll create a batch file or script that sets DONE to "N", perform the task
and then set DONE to "Y". The waiting MV program proceeds when DONE=Y.

I'm doing a project in VB that is to gather all of the files for a
particular extension (across all of the C: directories) and I have to use
this waiting method as well. I've worked with Twain scanners within MV that
also have timing issues.

These timing situations bite us in the rear as we're used to our code
processing sequentially. When one line of MV code kicks off another PC
session, we're used to the following line waiting until that session is
done.

My 1 cent.
Mark Johnson
----- Original Message -----
From: "Scott Ballinger" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, March 07, 2007 10:21 PM
Subject: RE: [U2] FTP


> Accuterm can also execute a vb-like script. Here is an example (I got it
> from the ASENT.COM web site) that executes a WORD mail-merge process. I
> added a belt-AND-suspenders solution to the timing problem: the script
> outputs a text string ("DONE") at the end, which the calling basic
> program waits for with an INPUT, after which it also SLEEPS.  In
> retrospect, 5 seconds seems a bit extreme; but this thing has been
> running for years and years, so I am unlikely to mess with it.
>
> /Scott Ballinger
> Pareto Corporation
> Edmonds WA USA
> 206 713 6006
>
> SUBROUTINE ATWORDMERGE.SUB(DOCUMENT)
>
> * THIS SUBROUTINE EXECUTES A PRESET WORD MERGE WITH A DOCUMENT USING
> ACCUTERM
> * 19 MARCH 2001 BC
>
> EQUATE EM TO CHAR(25)
>
> PRINT "Now printing document: ":DOCUMENT:"... ":
>
> *First create our object variables
> SCR =        'Dim WordApp As Object'
> SCR = SCR:EM:'Dim WordDoc As Object'
> SCR = SCR:EM:'Const SendToPrinter = 1'
>
> *Make sure errors dont mess us up
> SCR = SCR:EM:'On Error Resume Next'
>
> *Start up word
> SCR = SCR:EM:'Set WordApp = CreateObject("Word.Application")'
>
> *Open our source document
> SCR = SCR:EM:'Set WordDoc =
> WordApp.Documents.Open(FileName:="G:\UVWORDMERGE\':DOCUMENT:'",
> ReadOnly:=True)'
>
> *Merge the document with our data file
> SCR = SCR:EM:'With WordDoc.MailMerge'
> SCR = SCR:EM:'    .Destination = SendToPrinter'
> SCR = SCR:EM:'    .SuppressBlankLines = True'
> SCR = SCR:EM:'    .Execute Pause:=False'
> SCR = SCR:EM:'End With'
>
> * clean up
> SCR = SCR:EM:'   WordDoc.Close savechanges:=False'
> SCR = SCR:EM:'   Set WordDoc = Nothing'
> SCR = SCR:EM:'   WordApp.Quit'
> SCR = SCR:EM:'   Set WordApp = Nothing'
>
> * output text string back so we'll pause until word has completed
> SCR = SCR:EM:'   InitSession.Output "DONE" & Chr$(13)'
>
> PRINT CHAR(27):CHAR(2):'P':SCR:CHAR(13):
>
> PROMPT ""
> INPUT DONE
> PRINT
>
> SLEEP 5  ;* allow word to completely shut down
>
> RETURN
> -------
> u2-users mailing list
> [email protected]
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to