Sorry for exhuming that old thread, I wonder whether there is an identifier to get the actual layer or not? Something like $layer($active) or $window($active).layer? As setlayer it is not documentated in the mIRC helpfile at all, looking there was futile...