Ruby 初心者スレッド Part 24
■ このスレッドは過去ログ倉庫に格納されています
0557デフォルトの名無しさん
2009/01/18(日) 16:26:36OSやウィンドウ(アプリ)が何なのかによるんじゃないの?
↓LeopardでAppleScriptを介してiTunesのボリュームを変える
とか書かれても参考にならんでしょ?
require 'osx/cocoa'
include OSX
def iTunesVolume(volume)
script = NSAppleScript.alloc.initWithSource <<-EOF
tell application "iTunes"
set sound volume to #{volume}
end tell
EOF
error = OCObject.new
script.executeAndReturnError(error)
end
■ このスレッドは過去ログ倉庫に格納されています