Created
January 10, 2017 07:51
-
-
Save cmittendorf/da52f1368d05d5878ef8cf81aea07713 to your computer and use it in GitHub Desktop.
Creates a new Pages document from the text of the frontmost Safari document.
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
use AppleScript version "2.4" -- Yosemite (10.10) or later | |
use scripting additions | |
set content to missing value | |
tell application "Safari" | |
try | |
set content to text of first document | |
end try | |
end tell | |
if content is not missing value then | |
tell application "Pages" | |
activate | |
set new_document to make new document at end of documents | |
set body text of new_document to content | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment