[sd2_mr0577] Reimplement AutoScript
fixed crush on *nix