Applescript to type text, followed by a modifier key combo?
I'm not sure what the TextExpander application name and process name is so I will guess what it is. 

activate application "TextExpander"
    tell application "System Events"
        tell process "TextExpander"
            keystroke "attached"
            delay 0.5
            keystroke "z" using {command down}
        end tell
    end tell