How do I wait for a VBScript to finish?

Ken Ray kray at sonsothunder.com
Fri Aug 12 16:59:06 EDT 2011


On Aug 12, 2011, at 2:26 PM, Bill Vlahos wrote:

> I call a VBScript and need to know when it finishes so that I can restore a window. I can put a long delay but that isn't very elegant and the time delay should be a few seconds but it may take longer on older systems.
> 
> I'm doing the same thing with an AppleScript on the Mac but it doesn't seem to have this problem but that could be that it just does it quick enough. 
> 
> Is there a way to wait with messages or something like that for running a VBScript or AppleScript?

Technically unless you are executing something in your VBScript that is asynchronous, calling VBScript from LiveCode should be blocking (i.e. you won't get control back to your script until the VBScript has finished). Is it possible that the VBScript is executing quickly and returning to LiveCode but the *effects* of what the VBScript asked the OS to do is taking a while to complete?

What VBScript are you executing, btw?

Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/	




More information about the use-livecode mailing list