Created
July 11, 2012 10:11
-
-
Save alhafoudh/3089432 to your computer and use it in GitHub Desktop.
OSX 10.8 Mountain Lion - Migrate your stickies from Stickies.app to Notes.app
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Author: Ahmed Al Hafoudh <[email protected] | |
# | |
# Usage: ruby stickies-to-notes.rb | |
# | |
# Prerequisites: | |
# gem install rb-appscript | |
# | |
require 'appscript' | |
require 'osax' | |
include Appscript | |
se = app('System Events') | |
stickies = app('Stickies') | |
notes = app('Notes') | |
se.application_processes['Stickies'].windows.get.each do |window| | |
note = window.scroll_areas.first.text_areas.first.value.get | |
notes.activate | |
OSAX.osax.set_the_clipboard_to(note) | |
se.keystroke('n', using: [:command_down]) | |
se.keystroke('v', using: [:command_down]) | |
sleep 0.5 | |
end |
Hi, you must have ruby installed. Then look at the code comments at the top
…---
Ahmed Al Hafoudh
On 4.8.2012, at 22:48, jlangvad ***@***.*** wrote:
How do I use this?
---
Reply to this email directly or view it on GitHub:
https://gist.github.com/3089432
Really useful script.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do I use this?