ami script