Re: if if if Pfft!
Re: if if if Pfft!
- Subject: Re: if if if Pfft!
- From: Michelle Steiner <email@hidden>
- Date: Mon, 19 May 2003 19:17:29 -0700
On Monday, May 19, 2003, at 06:14 PM, Paul Skinner wrote:
tell application "Adobe Photoshop 7.0"
set documentMode to mode of document 1
if documentMode is CMYK then set channelCount to 4
if documentMode is in {RGB, Lab} then set channelCount to 3
if documentMode is grayscale then set channelCount to 1
end tell
Isn't there a smart way to do this? I can't recall, but I thought I
knew a way to do this as a single statement.
Well, technically, using else in that construct makes it a single
statement.
if documentMode is CMYK then
set channelCount to 4
else if documentMode is in {RGB, Lab} then
set channelCount to 3
else if documentMode is grayscale then
set channelCount to 1
end if
--Michelle
--
"My country, right or wrong: if right, to be kept right; and if wrong,
to be set right."
Senator Carl Schurz of Missouri, 1899
_______________________________________________
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.