new to applescript - can i make 1 script control 2 apps?

hi there… I hope that some kind soul out there may be able to shed some light on this for me!

being the only person in my office who knows how to do more than sending an email, i’ve been asked to delve in the world of applescript.

we process images in fotostation, batch resize in photoshop 7, then send them via ftp with transmit.

what i’m looking to do is automate the second and third stages of this process. i want to have a folder action that will, as i output images to that folder from fotostation, will have photoshop run a resize action, saving them to another folder where Transmit will then ftp them to a server.

I have the transmit script just about running but that’s as far as i’ve got.

Is this going to be possible?

best wishes

gareth.

It’s entirely possible to control more than one appllication in a single AppleScript. All you need to do is wrap all the commands for each app in a ‘tell application…’ statement.

For example,

tell application “Adobe PhotoShop”
– commands to open and resize the image
end tell

tell application “Transmit”
– commands to upload the file
end tell

I’m not enough of a PhotoShop user to know the specifics of how to resize an image via AppleScript.

that’s great. what i really need to work out now is how to have the script run automatically when new items are added to a folder.

gareth.

That is a frequent question here. There are three (or more?) solutions:

a droplet
a folder action
a timed script

Look how FolderOrg Script did it at
http://files.macscripter.net/ScriptBuilders/Finder-System/FolderOrg1.2.hqx

The first question of the Finder FAQ touches on it
http://macscripter.net/faq_finder.html

Unfortunately this ability has no settled name, so search the BBS for ‘add folder’ or ‘watch folder’. Many useful results will appear surrounded by many more non-useful results.

And there should be examples of Folder Actions on your computer installed when applescript was installed.

BTW, there is a big difference between OS9 and OSX’s handling of folder actions.