Fix @MsgRoutedVia macros.
Extend script subsystem.
Fix build with ENABLE_SCRIPTS=1 on Win32
