• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Applescript Virgin Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Applescript Virgin Question


  • Subject: Re: Applescript Virgin Question
  • From: Emmanuel <email@hidden>
  • Date: Sat, 19 Oct 2002 14:12:45 +0200

(sorry for being late) At 10:57 AM -0400 18/10/02, Joey Parshley wrote:

I would like to try writing my first script. Is the following possible and would anyone like to give me any pointers? I have never written an applescript (have written lots of javascript).
Here's what I want the script to do.

Look look in a folder that can have any number of sub folders. Each sub folder would be named as a job number i.e 20857. These job folders have in them identical folders named Ideas, Email, PDF etc.

I want to look in the PDF folder of each job folder and print three copies or any PDFs with the work "FINAL" in it.

A bonus to this script would be if I could place each PDF into a Quark Template and Print that out.

I would use Smile. (Since maybe you don't know much yet about AppleScript, Smile is a free AppleScript editor, it supports executing AppleScript command lines like in a shell, and it includes a scriptable text editor).

Smile includes two significant helpers for what you're wanting to do:

- "list files", will produce the list of all the files in the folder
- Regular expressions, will allow you to parse the list in order to retrieve something the files with "FINAL" at the end of their names which are in some "PDF" folder.
I've never written a regular expression correctly the first time, but it would look like:

$.*:[0-9]{5}:PDF:[^:]*FINAL

Smile includes a "Find" dialog with regular expressions, so testing R.E. is rather easy.

URL for Smile: <http://www.satimage-software.com/en/softx.html#smile>

I suppose that Acrobat Reader can be used to print the PDF's.

Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Applescript Virgin Question (From: email@hidden (Joey Parshley))

  • Prev by Date: "choose file name" Redux
  • Next by Date: Re: on renice
  • Previous by thread: Re: Applescript Virgin Question
  • Next by thread: Re: Applescript Virgin Question
  • Index(es):
    • Date
    • Thread