PDA

View Full Version : A challenge for automator or apple script coders




agp
Sep 11, 2006, 03:08 AM
Can anyone get the following scenario working?....

1. Someone emails me with a postscript file (.ps) as an attachment.
2. An email rule or some scheduled task starts an automator workflow/apple script/application
3. The task converts .ps into a PDF
4. Creates a reply email and emails the PDF back to the original sender.

Some notes to start you off...

1. The rules in Mail can be invoked when an email contains an attachment by name
2. The rules in Mail have the ability to start an apple script
3. There are two ways to convert the .ps to PDF
a) If you open a .ps in Preview it is auto-converted to PDF
b) In Macintosh HD > Library > Scripts > Folder Action Scripts there is a script called convert - PostScript to PDF.scpt


Hope this gets people started. Would be great if someone can solve this challenge and post scripts and instructions to get this working....The reason behind this is that work mates using windows are amazed that my mac can convert ps to pdf - so it would be cool if they can email my mac to convert .ps to pdf and receive a reply with the attached pdf.

Good luck.

Adrian



NewbieNerd
Sep 11, 2006, 07:26 AM
Installable virtual printer on Windows:

http://www.go2pdf.com

Website that can convert ps to pdf:

http://www.ps2pdf.com

Or they can just install cygwin and use the ps2pdf command.


I know the feeling of being the cool mac guy (as I type this on my iMac at work surrounded by mostly linux and some windows machines), but I don't think emailing is the way to do it.

MacBoobsPro
Sep 11, 2006, 07:34 AM
Can anyone get the following scenario working?....

1. Someone emails me with a postscript file (.ps) as an attachment.
2. An email rule or some scheduled task starts an automator workflow/apple script/application
3. The task converts .ps into a PDF
4. Creates a reply email and emails the PDF back to the original sender.

Some notes to start you off...

1. The rules in Mail can be invoked when an email contains an attachment by name
2. The rules in Mail have the ability to start an apple script
3. There are two ways to convert the .ps to PDF
a) If you open a .ps in Preview it is auto-converted to PDF
b) In Macintosh HD > Library > Scripts > Folder Action Scripts there is a script called convert - PostScript to PDF.scpt


Hope this gets people started. Would be great if someone can solve this challenge and post scripts and instructions to get this working....The reason behind this is that work mates using windows are amazed that my mac can convert ps to pdf - so it would be cool if they can email my mac to convert .ps to pdf and receive a reply with the attached pdf.

Good luck.

Adrian

Acrobat Distiller converts PS to PDF! :confused:

Unorthodox
Sep 11, 2006, 09:25 PM
Will the extensions be ".ps" or ".eps"?

acadie
Nov 20, 2008, 07:52 PM
yeah - lots of apps can do these required tasks... but however, applescript coding this solution would probably apply to lots more different situations, with just minor coding....

I'm replying to this thread 2 years after the last post - looking to do something similar... but different

we have installed at work a phone service and the only way to get the messages on the computer, is to have the ol' CallPilot100 to email the message in wav. not elegant - but this is "old school" electronics! lol!

so i'd need to build up a script to take the WAV attachment in the email and convert it to mp3 or m4a, and then delete the email (as wav files can be quite huge)

anybody with ideas?
:rolleyes: