“ There was some kind of command scripting recording macro tool that would copy a series of actions…”
Yes there was. I still have one of several machines with XP which I use every day for a few legacy programs. Macro Magic which does exactly what you describe is on that machine. I’ve had the program since before 2000 and also use it every day for macros I created that go back years.
No macromagic for Linux :-( it seems.