AW: how can I wait for revCopyFolder execution?
m.schonewille at economy-x-talk.com
Thu Aug 11 08:15:02 EDT 2011
Actually, LiveCode waits until the AppleScript returns a value, indicating successful compilation or failure, but it returns this value before the copying has finished. So, it is a combination of AppleScript returning a value early and LiveCode not reading additional results from AppleScript.
It is possible to return a value from AppleScript to LiveCode:
-- cScript custom prop
set x to 1+1
put the cScript of me into myScript
do myScript as AppleScript
put the result
You could try to return the message instead of running a LiveCode script inside AppleScript and see whether AppleScript waits for the copying to finish until it returns that value. The script would look like this (pseudocode):
return different value
Other commands that don't wait are open process and IIRC the popup command. I'm sure there are a few more but I don't know the entire list by heart.
Economy-x-Talk Consulting and Software Engineering
What does that error mean? Buy LiveCodeErrors for iPhone now http://qery.us/v4 A must-have for LiveCode programmers.
On 11 aug 2011, at 14:00, Tiemo Hollmann TB wrote:
> Hi Mark,
> thanks for your quick answer, I will give it a try.
> Because you have another approach I assume that it is a standard behavior
> with rev commands, that they don't wait?
> Up to know I presumed that every command is waiting up to it's end of
> execution. Are there more commands, which are not waiting?
More information about the Use-livecode