Question:
When I use Sleep method, my application hangs for the whole duration of this process. How can I fix this?
Solution:
This is the expected, default behavior of this method: user’s interface will not respond while the pause in script’s execution is on. All other processes in the background that are running on different threads (I/O, network drivers, video reception, etc.) will still work, but the scripts logic will pause.
A possible solution for this case would be to use a pre-set Chrono tag. Then, continue running the script in this tag’s OnPreset event.