script mode working

Tested in windows