-
Notifications
You must be signed in to change notification settings - Fork 0
/
todaynote.applescript
30 lines (25 loc) · 1.01 KB
/
todaynote.applescript
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
tell (current date) to get (its year as integer) & "-" & (its month as integer) & "-" & day
set dataText to the result as text
set mailTitle to dataText & "-DailyNote"
-- tell application "Google Chrome"
-- set FrontUrl to URL of active tab of window 0
-- set FrontTitle to title of active tab of window 0
-- end tell
tell application "Notes"
activate
tell default account
tell folder "DailyNote"
set counts to count of every note
if counts > 0 then
set CreationDate to creation date of note 1
set CDate to date string of CreationDate
set Today to date string of (current date)
set originalText to body of note 1
set body of note 1 to {"<hr>" & originalText & "<br>" & (the clipboard)}
-- set body of note 1 to {"<hr>" & originalText & "<br>" &(the clipboard) & "<br> <br>" & "<strong>Title: </strong> " & FrontTitle & "<br>" & "<strong>url: </strong>"& FrontUrl}
else
make new note with properties {name:mailTitle, body:(the clipboard)}
end if
end tell
end tell
end tell