Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Running an external program from Visual Foxpro program
Message
De
16/06/1998 09:50:10
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
15/06/1998 09:13:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00107729
Message ID:
00108635
Vues:
48
>Erik,
> thanks for your reply. Basically, this external program is EXPEDITE for Windows by IBM. We use it to transfer and receive files from the IBM Advantis system. This software creates a log for which my program can wait, but this cannot work because the EXPEDITE sw creates the file rightaway as soon as it is the sw is executes and we don't want to open the file till the entire transfer is done or else we will have file open errors.

It can wait. The trick is that if any program creates a file, its size is reported as zero as long as the program keeps the file open. So, in your fox routine, you launch Expedite, and create a loop like this:

do while .t.
n=adir(aFiles, "the_log.txt")
if n=0
* something wrong, can't find the file - exit or do something else
else
if aFiles[1,2]=0 && the length of file - see ADir function
* it's still working
wait "Processing... " time 5
else
wait clear
exit
endif
endif
enddo

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform