Re: Applescript Virgin Question
Re: Applescript Virgin Question
- Subject: Re: Applescript Virgin Question
- From: email@hidden (Michael Sullivan)
- Date: Fri, 18 Oct 2002 17:36:33 -0400
- Organization: Society for the Incurably Pompous
email@hidden (Joey Parshley) writes:
>
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'm not asking for anyone to write the script. I would just like some
>
pointers and perhaps a basic example I could follow. I really know I
>
need to tap into this powerful tool
The biggest issue you're going to have, IMO, is understanding the syntax
of the Finder, Acrobat and QuarkXpress.
I recommend you take a good look at the Scripting documentation that
came with Xpress for examples, it's pretty good. You can also look for
Shirley hopkins, _Applescripting QuarkXpress_, though it's a bit out of
date at this point.
Check out ScriptBuilders at www.macscripter.net and look at some of the
editable freeware for the programs you want to drive, especially if you
can find a script that does something similar. I'll bet you can even
steal some code (only legally, of course -- editable freeware there is
generally PD, lGPL, BD, MIT etc. -- these are various kinds of public
open source licenses that allow you to reuse code with different, and
sometimes no, restrictions.).
As Mark mentioned, looking through a folder tree is a recursive process.
If you've never done *any* programming before, you may have to get your
head wrapped around that idea. Note that there is a basic folder
recursion script at www.applemods.com which you can start with wich may
give an idea what's happening there.
Once you've gone through that, start trying to do stuff, and when it
doesn't work the way you expect it to, post the code here along with
what you thought it should do, and what it actually did. There are
folks here who script all the programs you talked about, and what you're
looking to do is fairly simple (I could probably write the script as
described in a day or less), so I be assured that it can be done, and
that this list can help you if you run into problems.
Text manipulation in AS is something of an esoteric art as well, so you
probably want to post whatever code you're using to find filename
matches even if it works perfectly, because I'll bet someone here can
speed it up, or make it more general or more something helpful, and
there are folks here who just love that sort of thing.
Good Luck!
Michael
--
Michael Sullivan
Business Card Express of CT Thermographers to the Trade
Cheshire, CT email@hidden
_______________________________________________
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.