getmodeindex - Script command