Need help scripting Photoshop...
Need help scripting Photoshop...
- Subject: Need help scripting Photoshop...
- From: "CS Carl Stawicki (4211)" <email@hidden>
- Date: Thu, 27 Mar 2003 15:52:09 -0500
Hi all,
This is my first post here. I consider myself an intermediate beginner in
Applescripting, I guess. I'm working on a script that does the following:
1. Stays open and idles while it monitors a drop folder. The drop folder is
a folder on a server that users would keep an alias of on their desktops to
drop tiffs onto.
2. Once a tiff is dropped, the script opens it in Photoshop and runs an
action. The action does it's thing and resaves the file as a jpeg to another
specified destination and closes the file. The script then deletes the
original dropped tiff.
What I came up with works very well, but I need few enhancements that I
don't know how to do. A stripped-down version of what I have so far is this:
--
on idle
tell application "Finder"
with timeout of 3600 seconds
set new_file_count to count files of folder "Server:Drop Folder"
repeat until new_file_count < 1
set new_files to every file of folder "Server:Drop Folder"
if new_files exists then tell application "Finder" to open new_files using
application file id "8BIM"
repeat
tell application "Adobe Photoshop 7.0"
if first document exists then
do action "My Action" from "My Action.atn"
else
exit repeat
end if
end tell
end repeat
if new_files exists then delete new_files
end repeat
end timeout
end tell
return 1
end idle
--
What I am stuck on is this:
1. I'd like the script to limit the number of files it opens into Photoshop
at one time. Right now, the script will open all the files in the drop
folder, which is fine, but I don't want it to open too many at once. If
there are, say 10 files open and processing through the action, and I drop 5
more in the drop folder, it will stop processing the original 10 and open
the new 5 before it continues. I don't know what Photoshop's limit is, but
there is the possibility we may drop 100's of tiffs in this folder at once.
2. I'd like Photoshop to delete any alpha channels, if there are any, before
it runs the action.
3. I would like to delete the original tiff from the drop folder without
moving it to the trash, just delete it all together (I don't even know if
this is possible).
Vital information:
Mac OS 9.1.4
Applescript 1.8.3
Photoshop 7.0.1
I'll take any help and suggestions. Thanks in advance.....
Carl.
_______________________________________________
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.