Thanks, Martin. I already use keyboard macros back only in the limited sense that applied to Delphi. I hadn't really investigated the Lazarus version of Keyboard Macros, but I can see straight away that they look much more powerful. I'll check them out, and then. if I'm still stuck, I'll look at Pascal Script. I've dealt with the author Carlo Kok, in his RemObjects capacity and he's a clever boy, so I'm sure that will be good.