Get length of activescreenresolution


Is there any way to get the length of the activescreenresolution variable on the activation group? Basically count the number of commas, using a LIKE or ma
I want to use this to detect the number of external displays that I have currently connected.

Maybe a longshot, since reading the documentation states that activation groups should be quick and easy to calculate, but is there any option to increment the control the use has? I see that the code for the activation group looks like a SQL query. Maybe keep the variables but allow us to code the query in order to perform COUNTs or something like this?

Either way, thanks for the good job so far!

I think a regex match could work for checking the number of commas.

This should be true if exactly 4 commas are in there:


Unfortunately this is not SQL or anything the like and it can not be extended on user side.

1 Like

Thank you so much, Andreas!

Indeed it works!
I had falsely assumed that this was SQL, but I understand that this can't be extended on the user side (clearly not an expert since I don't even know regex).

Thanks for the quick response and amazing job on the app

P.S.: if someone needs this case, for N monitors the number of commas is 4N - 1.

1 Like

I also never remember all the regex details, but chatgpt is awesome at this :slight_smile:

1 Like