For your second question read this post from @Fox ,
maybe its what you need. Its in Russian, but you can
use translator. There is an example script too >
Trying to call new async function:
with this inside:
It works on record mode but in compiled mode it says " [340972987] [11:21:10] Thread #1 : Thread ended with message "ReferenceError: Can't find variable: _thread_start during execution of action "