Re: Toggling Boolean values (was: iTunes -- Remove Missing Tracks?)
Re: Toggling Boolean values (was: iTunes -- Remove Missing Tracks?)
- Subject: Re: Toggling Boolean values (was: iTunes -- Remove Missing Tracks?)
- From: Kai <email@hidden>
- Date: Fri, 07 Feb 2003 01:49:10 +0000
on Sat, 01 Feb 2003 00:24:51 +0000, I wrote:
>
on Thu, 30 Jan 2003 12:49:00 -0500, Pete Dako <email@hidden> wrote:
>
>
> tell application "iTunes"
>
> if mute is true then
>
> set mute to false
>
> else
>
> set mute to true
>
> end if
>
> end tell
>
>
I can't test this at the moment, Pete, but you may just be able to get away
>
with something like:
>
>
=================================================
>
>
tell application "iTunes" to set mute to not mute
>
>
=================================================
on Sat, 1 Feb 2003 03:03:37 -0500, Pete replied:
>
that wouldn't toggle it on/off would it the way using if and end if
>
statements, would it?
Did you try it, Pete?
As I said, I couldn't test the technique with iTunes specifically - but,
since 'mute' takes and returns Boolean values, I was pretty sure it _should_
work. (I'd used the method successfully with other applications - and
mentioned it in case you might want to try reducing your original 7 lines to
just 1.)
Anyway, for anyone who may be interested, I'm pleased to confirm that the
method does indeed work (tested with iTunes 3.0 / OS 10.2.3 / AS 1.9.1).
--
Kai
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.