• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Thanks all for Help.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thanks all for Help.


  • Subject: Re: Thanks all for Help.
  • From: Paul Skinner <email@hidden>
  • Date: Wed, 14 Feb 2001 00:29:26 -0500

on 2/13/01 8:51 PM, J. Kiely Jr. wrote:

> Thanks for everyone who helped out, I'm learning,
> just not fast enought.
>
> Thank you: Steve Goodman, Ed Stockly, and Pauk
> Skinner...
>
> ------
>
> On Tuesday, February 13, 2001 6:17 PM, Paul
> Skinner wrote:
>> set cs to the color space of the current
> document
>> if cs is not "CMYK mode" then
>> convert the current document to CMYK
> mode
>> end if
>> Although under PS 6.0, I also get a temporary
> file generated that I didn't
>> get under 5.5.
>
> Paul Skinner,
> Thank you for your help and sample
> code. I tried to learn as much as I could from it and
> now the darn thing works! Imagine the smile on my
> face..

I'm glad I could be of some help! How about a bit more?

> However it would not run for me until
> I changed <color space> to <color mode> in your
> code.

See the modified script below for why.

>Also the "" around CMYK mode did not work for
> me. Don't know why. When I removed your <without
> invisibles> code the sneaky zero K temporary files
> disappeared from the directory.

Also see below.

> Funny, but the
> quality level won't work above 10 although PS 5.5
> and above go to 12...

also also below.

> Here is what I have now, and it
> works... time to add some fancy stuff... again thank you
> very much!

Happy Scripting!

>
> --- begin script (PhotoScripter required)
>
> tell application "Finder"
> set fileList to list folder "ImagesHD:photos:"
> end tell
> repeat with x from 1 to the length of fileList
> set workPicName to item x of fileList
> set workPicRef to ("ImagesHD:photos:" &
> workPicName) as text
> set newPicRef to ("ImagesHD:finis:" &
> (workPicName as text)) as text
> tell application "Adobe. Photoshop. 6.0"
> activate
> set dialog interaction level to silent mode
> set workPicId to open file workPicRef
> if color mode is not CMYK mode then
> convert it to the CMYK mode
> end if
> save the current document as JPEG {image
> quality:10} ,
> in file newPicRef with appending file
> extension
> close the current document saving no
> end tell
> end repeat
>
> -- end script
>
> Thanks again,
> peace,
> J.

Coments in the code instead of sentences in a paragraph. Am I
scripting too much?

Nah.

tell application "Finder"
set fileList to list folder "ImagesHD:photos:"
end tell
repeat with x from 1 to the length of fileList
set workPicName to item x of fileList
set workPicRef to ("ImagesHD:photos:" & workPicName) as text
set newPicRef to ("ImagesHD:finis:" & (workPicName as text)) as text
tell application "Adobe. Photoshop. 6.0"
activate
flatten current document --prevents the dialog upon changing modes.
-- Apparently, silent isn't.
set dialog interaction level to silent mode --Still, couldn't hurt.
set workPicId to open file workPicRef
--OK.Here you have the following line...

--if color mode is not CMYK mode then

--You should refer to the current document to get it's color mode.
--Or better yet the workPicId. This prevents getting the wrong
--document when several are open.
--'color mode of current document' errors on compile here when
--you address the current document.
--Use 'color space' to be true to Photoscripter's dictionary.
if color space of current document is not "CMYK mode" then
--Now you DO have to use the quotes. ;)
convert current document to the CMYK mode
end if
--watch the wrap.
save the current document as JPEG {imagequality:10} in file
newPicRef with appending file extension
--I belive that the limitation here is that you can't script a
--true quality of 1 or 2. The value of 10 will, in fact, save
--a file with a quality of 12 in PS. The value of 1 will yeild a
--quality of 3.
close the current document saving no
end tell
end repeat

--
Paul Skinner


  • Prev by Date: Re: remove, please
  • Next by Date: Re: Hiding the Apple System Profiler while it executes
  • Previous by thread: Re: remove, please
  • Next by thread: Re: Hiding the Apple System Profiler while it executes
  • Index(es):
    • Date
    • Thread