is it possible to do with a flag from the script editor?

I mix flagset, setflag, globalflag, etc ...