New needing gentle nudge: applescript or automator?

Hi -

I’m new to macs and have been learning a bit about Applescript and Automator. But I’m still a bit confused about knowing which to learn more about for my two current needs. Can someone please give me a nudge?

1> working from within Excel 2008, I need scripts to automate repetitive things I do.

2> I have a source file - can be text or dbf or excel - with 2 fields of info (Filename, FileComment) for 1000 records. I have 1000 pdf files, whose Filenames match the filenames in the source file. I need to get the filecomment from the sourcefile into a metadata field of the corresponding pdf. Should I be learning about applescript? Automator? Or something else entirely?

Thank you very much -

Hi Marion,

welcome to MacScripter.

In your case you can’t accomplish your task(s) only with Automator,
because there are no specified actions for MS Excel.

As VBA no longer exists in Excel 2008, AppleScript is the only way to do it

It’s confusing for newcomers…

Someone at the apple forum helped me with a beginner’s script - to save my Excel Print Area as a pdf. He tried initially just from Applescript, but then, to get it to work, we had to paste the AppleScript into Automator!

So, it’s really hard for a newcomer to know what to learn about first…


Automator is actually a GUI for AppleScript, which is easier to use for people without AppleScript knowledge.
But working with applications you need specified actions for these applications.
A workflow with only one Run AppleScript action is like a .doc file containing just a .jpg :wink:

You can also run AppleScripts directly from the script menu, which can be enabled with /Applications/AppleScript/AppleScript

What about if my log file is a dbf, or text file (delimited with tabs, or commas)?

Would I be able to use Automator to read the text file, and populate the corresponding fields of a pdf’s metadata?

Thank you -

a text file is easier to handle with AppleScript.

The main question is, how to add the metadata to the pdf files.
When you do it manually, which application do you use?

Remember, Automator without application specific actions is useless

Hi StefanK

Well, I don’t usually add metadata to my pdf files.
I’m just trying to add metadata to these pdf files.

However, while I’m doing it as a single file test run, I open a pdf using acrobat, and then go to File->Properties->Additional Metadata->ExpressionMedia.

As a half-way measure, I’d be content to open the pdf using acrobat, go to File->Properties and copy the line of text from the log file into DocumentProperties:Description:subject

does that help at all?

Basically, I want the exact opposite of the Automator Workflow titled: Library.PDFs.GetPDFMetada.

That script extracts specified metadata from PDF documents, and creates a text file, where each line contains tab-delimited metadata from each input file.

I want a script to use a tab-delimited text file, and use the data in the text file to find a corresponding filename.pdf, and populate specified fields.


Well, I had help, but I did it!

I found a script by Daniel Robillard

and worked with my source data, and it works. Perfectly.

The data in my source log file gets transfered to the appropriate annotation fields in Expression Media2.

Fabulous -
Thank you