Created
February 8, 2011 15:30
-
-
Save moyashi/816582 to your computer and use it in GitHub Desktop.
TypeIt4MeのAppleScript実行機能でAppleScriptを評価してペーストするサンプル
This file contains 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
℁ | |
-- http://twitpic.com/3xq8rf | |
-- Rubyを呼び出しているサンプルです | |
-- 「システム環境設定>ユニバーサルアクセス>補助装置にアクセスできるようにする」をONにしていないと動かないです | |
on paste(s) | |
set old to the clipboard | |
set the clipboard to (s as unicode text) | |
tell application "System Events" | |
key down command | |
keystroke "v" | |
key up command | |
end tell | |
set the clipboard to old | |
end | |
set r to do shell script "ruby -e 'puts Time.new'" | |
my paste(r) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment