I think the canonical answer would be Userland Frontier and/or AppleScript?
By System 7, and even moreso later, applications had scripting interfaces built in that could be activated by the above programs. It began in 7.0 with "high level AppleEvents", and then grew with OSA Vocabularies (Open Scripting Architecture) in 7.5 and above.
AppleScript is designed to resemble English, which is a strength and also a weakness. You can say things like "tell Pagemaker to open the file and export" if the application includes "export" in its Vocabulary. Later in OSX another tool called Automator was included that can combine workflows using AppleScripts, command line tools, and stored events in the Cocoa framework.