done, ... = ContinueAsyncOperation(id)
id
. id
must
be set to an asynchronous operation handle created by functions which support asynchronous
operations, e.g. CopyFile() or DownloadFile().
Once the asynchronous operation has finished, ContinueAsyncOperation()
will free
the asynchronous operation handle and return True
. If ContinueAsyncOperation()
returns False
, the operation hasn't finished yet and you need to call ContinueAsyncOperation()
again until it returns True
.
If the Hollywood call that created the asynchronous operation handle returns values to
the script on completion, ContinueAsyncOperation()
will forward those values to your
script as soon as the asynchronous operation has finished, i.e. when done
becomes True
.
In that case, ContinueAsyncOperation()
may return additional values depending on the command that
created the asynchronous operation handle. For example, DownloadFile()
will return the downloaded data as well as its length to the script on completion.
To abort an asynchronous operation, you can use the CancelAsyncOperation() function. See CancelAsyncOperation for details.
True
if the operation has finished, False
otherwisedone
is True
, all additional return values
from the command that created the asynchronous operation handlehandle = CopyFile("images", "sounds", {Async = True}) Repeat NextFrame(1) Until ContinueAsyncOperation(handle) = TrueThe code above demonstrates how to show an animation while copying the
images
directory into the sounds
directory.