ChrisLee
Subscriber

Maybe because you're edit in analysis group while "groupscope" can't used in here,you can just try "selectall;delect;" 

"groupscope" can be used in Script File Editor.