Created
February 8, 2021 11:57
-
-
Save hfossli/5648efbe554d6e58a65d4ba5477a8779 to your computer and use it in GitHub Desktop.
Automator script for opening mail application and printing the current open window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on run argv | |
tell application "Mail" to activate | |
tell application "System Events" | |
keystroke "p" using command down | |
delay 2 | |
keystroke tab | |
keystroke tab | |
keystroke tab | |
keystroke tab | |
keystroke tab | |
keystroke tab | |
keystroke tab | |
keystroke tab | |
keystroke space | |
key code 125 | |
key code 125 | |
keystroke space | |
delay 2 | |
keystroke "converted-email.pdf" | |
key code 36 | |
end tell | |
end run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment