Last active
March 2, 2017 18:07
-
-
Save slashk/fd3d4ee20d10e86d513ecca448195113 to your computer and use it in GitHub Desktop.
Create reminder from Chrome tab
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
set importance to 9 | |
tell application "Google Chrome" | |
set tabname to get title of active tab of window 1 | |
set taburl to get URL of active tab of window 1 | |
close active tab of window 1 | |
end tell | |
display dialog "Job Priority" buttons {"Low", "Medium", "High"} default button 1 with icon caution with title tabname giving up after 10 | |
-- priority : (1=High, 5=Medium, 9=Low, 0=None) | |
if the button returned of the result is "High" then | |
set importance to 1 | |
else if the button returned of the result is "Medium" then | |
set importance to 5 | |
end if | |
tell application "Reminders" | |
tell list "Jobs" | |
set newremin to make new reminder with properties {name:tabname, body:taburl, priority:importance} | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment