i'm adding a function to allow users to set their own preferred client.view size, but i want to put a safety check in that will make sure text strings are the right format (num "x" num), to avoid crashing the proc. Does anyone know of code available to do this already?

i'm adding a function to allow users to set their own preferred client.view size, but i want to put a safety check in that will make sure text strings are the right format (num "x" num), to avoid crashing the proc. Does anyone know of code available to do this already?

I doubt any such code exists; the client.view change is a relatively new one. I would recommend using input() with "as num" to get a size, and make that a square size by setting client.view="[size]x[size]". If you want to allow other sizes, just call input() again with the first size as the default, and then set client.view="[xsize]x[ysize]".