Re: if if if Pfft!
Re: if if if Pfft!
- Subject: Re: if if if Pfft!
- From: Paul Skinner <email@hidden>
- Date: Tue, 20 May 2003 14:50:20 -0400
On Monday, May 19, 2003, at 10:27 PM, Shane Stanley wrote:
On 20/5/03 11:14 AM +1000, Paul Skinner, email@hidden, 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.
You should really be using "else if"s in that, but I think what you're
looking for is:
tell application "Adobe Photoshop 7.0"
tell current document
set channelCount to count of (get component channels)
end tell
end tell
--
Shane Stanley, email@hidden
Thanks Shane, that is what I need to use. That resolves all cases.
But it's not the method I was thinking of. Maybe I was thinking of
using offset to do a kind of hash. yuck.
Paul Skinner
_______________________________________________
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.