09/01/18 16:26:36
>>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