Inactive Finder windows

I’m looking for a snippet of AS code to identify when the Finder is active, with windows showing but none of those windows are currently selected/active i.e. the user has clicked on the Desktop/background leaving other Finder windows inactive.

The correct suggestion will be rewarded with obsequious praise!

Nigel wins! Thanks Nigel. Wear this with pride!

Aaaaaaaaaahh!!! Me? Oh my gaahhd!! Oh - my - gaaaaahhhhd!! Tha… [sniff, cough] Ha-ha! Thank you! What an honour! I’d like to thank my marm … and my agent … and my brother an… [sniff] … and his wonderful, wonderful family … and two of my ex-girlfriends … and my aunt’s goldfish, who believed in me during those dark years … an’ I’d like to thank Rob and all those great people at MacScripter.net … and all those wacky geniuses over on the AppleScript-Users and MACSCRPT mailing lists … and alt.comp.lang.applescript for getting me started … and … [sniff] … and I’d just like to say … [unk] … a great project like this involves teamwork and … [choke] … and … waaaaaaggggghhhhh!!! Thank you. I’ll treasure this always.

:wink:

NG