|
|
Convert multiple text files to Mail notes
I used this script on Snow Leopard 10.6.8 and have some problems.
First of all OSX didn't allowed me to run "click the menu item" lines in Applescript part of code until I've enabled access for assistive devices. To enable it run "System Preferences", then "Universal Access" and check "Enable access of assistive devices" on the bottom.
Another problem was with assigning Applescript part as "cmd" variable. I have no time to find out why so I moved lines: tell application "Mail" activate end tell tell application "System Events" tell process "Mail" click the menu item "New Note" of the menu "File" of menu bar 1 click the menu item "Paste" of the menu "Edit" of menu bar 1 end tell end tellto separate Applescript file (I opened Applescript Editor, pasted above lines and saved it in my homedir as make_note.scpt). Then I've changed very last line of Python code: instead of os.system(cmd)I used: os.system("osascript /Users/paczor/make_note.scpt")It worked very well. If one will run this script he will end up with many notes windows opened, I had 88 notes so have to close them all. ;) If bother add following line: click the menu item "Close" of the menu "File" of menu bar 1after this line: click the menu item "Paste" of the menu "Edit" of menu bar 1 |
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 |
|