"%var = value" syntax does not work from the editbox, use this instead:

//var %x = $scon(0) , %wins | while (%x) { scon %x | var %wins = $+(%wins,$regsubex($str(.,$window(*,0)),/(.)/g,$+(%x,:,$window(*,\n),.))) | dec %x } | scon -r echo -a %wins