Perl Windows - Grab all the system tray icons & get their co-ordinates


While automating applications on Windows, every now & then I run in to a situation where I have to find a tray icon & do some mouse operations on it. And for the most part, I overlooked it as it was just a small part of my automation needs. Well, it was time to scratch that small itch as it was bothering me. So with the help of Sinan on StackOverflow, I ended up writing this script.

This should work on both 32 & 64-bit platforms: