AutoIt is a lightweight freeware BASIC-like scripting language designed for automating the Windows GUI and general scripting.
It is especially useful for generating keystrokes and reading information from native Windows controls. Library functions are included for the automation of Microsoft Office applications and web browsers.
It can be downloaded from https://www.autoitscript.com/site/autoit/, a site which also contains a comprehensive documentation set.