English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Hi Macfans!

I produce a series of magazines on Mac using Quark, Photoshop and Acrobat Distiller. I used PCs up until recently (bit of a Mac newbie), and have just discovered AppleScript which I think can make a lot of difference to my workflow.

I have it working with great success within Photoshop but need help setting up one for Finder i.e not within any particular application.

What I need is a script which says "when a new file is placed in this particular network folder (by someone else), send an email with notification of its arrival (preferably containing the filename) to this address" or activate some other type of alert or popup.

I need to know where to get, or how to make, this script and also instruction on how to implement it - and any other tips you Script-heads out there may have!

Thanks for reading this question and BIG thanks to anyone who can answer...

Cheers

KaiBosh

PS PLEASE don't just point me at the AppleScript website unless it's a particular page, thanks

2006-09-05 04:38:13 · 3 answers · asked by KaiBosh 2 in Computers & Internet Programming & Design

3 answers

You need to enable folder actions and then configure your particular folder to execute a particular applescript. So, basically, your applescript will just send the mail or give the alert. There's example scripts in your Applescript folder for sending mail. I'm not sure if you can use Automator's workflows directly, but you can refer to them in your Script.

Hope i helped a little

2006-09-07 05:50:25 · answer #1 · answered by nathan75932 6 · 0 0

I have messed around with AppleScript a bit, and i have to say I really hate its syntax. It tries way too hard to look like English, but it's really just as picky as everything else. I find it's impossible to get my head speaking AppleScript.

Fortunately there are alternatives. Frontier was great for OS 9, but not so much for X. A great modern alternative is python's Appscript module. That uses pythonw (windowed python) to send Apple Events to scriptable applications: he Finder, QuarkXPress, OS X apps, Photoshop, you name it. You can use the Script Editor's documentation; the syntax for describing objects is better but the terms are the same as AppleScript.

Python is a spectacular language. If you want to build a library of automated tasks for Mac, python is a great choice.

And it's probably installed already. To find out, open the Terminal and type
my-computer:~ me$ pythonw
Python 2.3.5 (#1, Jan 13 2006, 20:13:11)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

The lines after 'pythonw' are the output from your Python interpreter. To exit the shell, close the Terminal window or press control-D.

2006-09-05 04:56:35 · answer #2 · answered by poorcocoboiboi 6 · 1 0

If you are on 10.4 you might try Automator. I know a little about Applescript and I am not sure if it is possible to hook an Applescript script to a event in Finder. I know you can make a droplet which is an applescript that runs when a file is dropped on it.

I hope this is helpful.

2006-09-05 04:55:53 · answer #3 · answered by Paul B 3 · 0 0

fedest.com, questions and answers