Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code seems to execute twice
Message
 
 
À
14/05/2007 21:40:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01225415
Message ID:
01225423
Vues:
17
>>Hi Rich,
>>
>>Unrelated observation, but this is the first that I noticed in this code:
>>
>>Why do you create oshell = CREATEOBJECT("wscript.shell") in the SCAN loop? Seems to me you need to do it once outside and then simply run the commands.
>>
>I don't. It is actually created in the program which calls this function. I put it near the RUN() statement to show what was running.
>
>>I'll look closer to the code.
>>
>>Also this
>>FOR I = 1 TO lnRecips
>>>        oWWIP.cRecipient = ALLTRIM(aRecips[i])
>>>        oWWIP.SendMail()
>>>      ENDFOR
>>
>>may send multiple e-mails.
>>
>That is the intention. If the users enter multiple addresses with a semi-colon as delimiter the program does not send properly. I probably should have replaced the semi-colon with a comma, but sending a separate email to each recipient was the first thing I thought of and it worked so I never looked at a better way of doing it.
>
>
>
>>In addition, do you have timer running? Do you disable the timer before running this code?
>>
>
>Yes I do and No I don't. We actually want the timer to fire again even if this code is still running. I can tell you that the second email is definitely not coming from a second timer.
>
>Thanks for responding..........Rich

How do you know that the second e-mail is not coming from the timer? Can you disable it just for the test and see, if it changes anything?

Also you may print astackinfo() information right before oWWIP.SendMail() to see where it is called from.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform