Re: Fade Itunes
Re: Fade Itunes
- Subject: Re: Fade Itunes
- From: Johnny AppleScript <email@hidden>
- Date: Mon, 20 Sep 2004 14:00:50 -0600
On 04/09/20 10:54 AM, "Ron Rosson" <email@hidden> wrote:
> Calling Applescript from Cocoa using an NSAppleScript object. Would like to
> be able to fade out a currently playing song on iTunes.
>
>
> Anyone know how to accomplish this?
Whoops! Sent the wrong script; that was an old version; try this one using
less calls:
tell application "iTunes"
set fadeStep to 10
set currentVol to sound volume
set newVol to currentVol
repeat
set newVol to newVol - fadeStep
if newVol < 0 then set newVol to 0
set sound volume to newVol
if newVol ¾ 0 then exit repeat
end repeat
repeat
set sv to sound volume
if sv < currentVol then set newVol to newVol + fadeStep
if newVol > currentVol then set newVol to currentVol
set sound volume to newVol
if newVol = currentVol or newVol > currentVol then exit repeat
end repeat
end tell
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Fade Itunes (From: Ron Rosson <email@hidden>) |