CommandLine input to confirm/exit special mode like _BlockEdit?

Just to be able to automade blockediting in place better, i’m hoping to find out if there is commandline input I can type to confirm out of blockediting for example so I don’t have to manually click the button “OK” for every block I go in?

This can help me specifically to mass change block object layers, materials, etc.

Thank you!