Skip to content

Instantly share code, notes, and snippets.

@slashk
Last active March 2, 2017 18:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slashk/fd3d4ee20d10e86d513ecca448195113 to your computer and use it in GitHub Desktop.
Save slashk/fd3d4ee20d10e86d513ecca448195113 to your computer and use it in GitHub Desktop.
Create reminder from Chrome tab
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