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 >
Getting better performance
-
@Blackjack Check bas wiki
@Blackjack Check bas wiki