|
|
10.8: New Notes App Service
And apparently the body is always HTML, so you also need to escape characters like <. Just adding white-space:pre seems to preserve whitespace though. on run {input, parameters}
tell application "Notes"
tell folder 1 of account 1
make new note with properties {body:"<body style=white-space:pre>" & my amp(input) & "</body>"}
end tell
activate
end tell
tell application "System Events" to tell process "Notes"
set selected of row 1 of table 1 of scroll area 1 of group 1 of splitter group 1 of window 1 to true
set focused of group 1 of UI element 1 of scroll area 1 of group 2 of splitter group 1 of window 1 to true
end tell
end run
on amp(input)
my replace(input, "&", "&")
my replace(result, "<", "<")
my replace(result, ">", ">")
end amp
on replace(input, x, y)
set text item delimiters to x
set ti to text items of input
set text item delimiters to y
ti as text
end replace
In the previous scripts you should use |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.07 seconds |
|