Run AppleScript in Automator

Can anyone tell me, or point in the right direction for including the following in a Run Applescript action:


tell application "Image Events"
      set theImage to open "localhost:projects:JPEGimages:"
      save theImage as PDF in "localhost:projects:PDFimages:"
      close theImage
end tell

Essentially, getting the specified finder items and saving as a different file in another location.
Much appreciated

Action:

Image Events can’t convert to PDF, nor can it convert an entire folder at once; it needs to take a single image at a time to do the conversion.

If you are serious about converting to PDF, read this thread. The only problem is that I am unsure how to build this to work with Automator.

Thanks for taking a look CAS.
Could you use Apple’s Convert to PDF script and attach that as a folder action?
It’s too bad Image Events can’t run this. Preview would do just as well for me, if GUI scripted. I can’t figure out how to activate the Save As > PDF navigation though. The problem with the Convert to PDF for me is that it runs through the Printer which sets the image on a white page of a preset size.

Jacques - That’s perfect. Way to go. Much Thanks.
:smiley: