added TSwitch support
compiles with -D hscriptPos