>>554
OSやウィンドウ(アプリ)が何なのかによるんじゃないの?

↓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