Internal commands always run synchronously - Opus will always wait for an internal command in a function to finish before moving on to the next instruction
I have a button I'm experimenting with that calls find via cmd.RunCommand
What I see is the script moving on while find is clearly still searching. I can see the progress dialog on the screen and yet looking at the script log I see the script has carried on.
Is something not working correctly, or am I misunderstanding how this all works?
That's not entirely true, as there are some exceptions like the Find command. Something we need to improve on that page of the manual.
If the aim is to find files matching a filter to use in the rest of the script, doing it via the script itself may be the best thing. DOpus.FSUtil.ReadDir can get you a list of everything below a directory (recursively, if specified) and the wildcard and metadata objects can be used to do most types of filtering.