Skip to content
kjunichi edited this page Apr 9, 2013 · 8 revisions

Applescriptの可能性を探る

Rubyのスクリプトを埋め込める!

macrubyもできるし、PerlでもPythonなんでも応用できるが、 rubyやmacrubyだとCocoa APIに簡単にアクセスできるので、 いろいろ応用が可能。

set theScript to "require 'osx/cocoa'; 
・・・
do shell script "/usr/bin/ruby -e " & quoted form of theScript

参考ページ

起動中の可視アプリケーションを List に入れる

tell application "System Events" to set appList to name of every process whose visible is true

関連記事

関連ページ

Clone this wiki locally