Applescript Export Stickies to txt files


/ Published in: AppleScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. set snf to "echo" & " "
  2. set theName to ""
  3. set exportallstickies to "> "
  4. set i to 0
  5. set n to {}
  6. set L to {}
  7. set destFldr to ""
  8.  
  9. set mydestFldr to ""
  10.  
  11. if destFldr = "" then
  12. set destFldr to (choose folder with prompt "Choose a destination folder:") as text
  13. set mydestFldr to POSIX path of destFldr
  14. end if
  15.  
  16. tell application "Stickies"
  17. activate
  18. tell application "System Events"
  19. tell application process "Stickies"
  20. set L to name of every window
  21. try
  22. repeat with awindow in L
  23. set m to value of text area 1 of scroll area 1 of window awindow
  24. set end of n to m
  25. end repeat
  26. end try
  27. try
  28. repeat with acontent in n
  29. set i to i + 1
  30. set theName to "stickies" & "_" & i as string
  31. set x to item i of n
  32. do shell script snf & "\"" & x & "\"" & " " & exportallstickies ¬
  33. & "\"" & mydestFldr & "\"" & theName & ".txt"
  34. end repeat
  35. end try
  36. end tell
  37. end tell
  38. display dialog "done"
  39. end tell

URL: http://www.macosxhints.com/dlfiles/stickies_export_scpt.txt

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.