Re: if if if Pfft!
Re: if if if Pfft!
- Subject: Re: if if if Pfft!
- From: Michael Cytrynowicz <email@hidden>
- Date: Tue, 20 May 2003 10:06:52 +0200
Paul, maybe you can use this to base a script on:
tell application "Adobe Photoshop 7.0"
get kind of every channel of current document
end tell
-- for a CMYK file with an added alpha channel and a spot channel it
returns: {component channel, component channel, component channel, component
channel, spot color channel, masked area channel}
--for an RGB with an alpha and a spot channels it returns: {component
channel, component channel, component channel, spot color channel, masked
area channel}
so the trick, I guess, would be to set the var to the returned no. of
component channels...
Mike
>
From: Paul Skinner <email@hidden>
>
To: AppleScript Users Users <email@hidden>
>
>
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.
>
>
Paul Skinner
>
>
ps. No I can't just count the layers. There may be any number.
_______________________________________________
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.