5 ms·
This works : #!/usr/bin/env osascript -l JavaScript function run(argv) { var note = Application('Notes').notes['Terminal Note']; note.body = note.body()
by dalbin 12y ago
This works :
#!/usr/bin/env osascript -l JavaScript
function run(argv) {
var note = Application('Notes').notes['Terminal Note'];
note.body = note.body() + new Date() + ' : <pre>'+argv.join(' ')+'</pre>';
}
- kingnight 12y agoThis is really great! A couple notes for anyone trying it: 'Notes' has to be running & there has to be an existing note with the first line 'Terminal Note'. Both could be handled if anyone wanted to make it more robust. This will be great for shooting specific tidbits of info from my work computer to my iPhone (which aren't connected via iCloud).
- gargarplex 12y agoFor anyone interested in learning more about JavaScript for OSX automation http://developer.telerik.com/featured/javascript-os-x-automation-example/ http://developer.telerik.com/featured/javascript-os-x-automa...