Off hand I can't remember what the charge is, but it is something to do with the civic government Scotland act 1982.
Yes window cleaners have been taken to court, in various area in Scotland. I know in Dumfries & Galloway at least 4 were prosecuted and fined £200/£250, they all later gave up window cleaning.
Doug Atkinson and myself had great success with Dumfries & Galloway council in getting licenses enforced, in 2002 when licensing was introduced in the region, there was only 2 window cleaners licensed that includes me, by 2012, when I left the area there were 154 licensed window cleaners, we didn't get rid of all the unlicensed window cleaners, but we got down to around 25 unlicensed of which most were employees of national companies or cross border window cleaners coming into Scotland, who were a bit harder for the authorities to catch as they were only in area for few jobs then back across border again. A few were caught though and given the choice stay out or apply for license.
When I moved to area prices were worse than what I was getting in my previous area, (Fife), by the time I left area in 2012 and returned to Fife my prices down there were 50% higher than they are here now in Fife.
Better pricing down there wasn't exclusive to me, many of the lower priced window cleaners upped prices and we all ended on similar prices.