Re: applescript and graphics programs
Re: applescript and graphics programs
- Subject: Re: applescript and graphics programs
- From: garbanzito <email@hidden>
- Date: Tue, 11 Jun 2002 13:49:49 -0600
at 2002 06 11, 09:25 -0400, they whom i call Erik Price wrote:
1. read all files in a folder into an array of new "GraphicFile" objects
2. for each object, determine the app to use from the creator code
(or my own hash key system, though unsure yet if AS has this ability)
and set as an attribute of the object somehow
[...]How does this sound? Feasible? I don't know how to create
objects in AppleScript but I am armed with "AppleScript in a
Nutshell", curiosity, and a helpful mailing list. If I am going
about this the wrong (or even the right) way, please feel free to
comment on my approach!
unless you need your GraphicFile objects to respond to
messages, i would not bother with objects, but instead
create a list of records. there are no arrays in
AppleScript. determining AppToUse is a simple test. from
your description, you'd simply default to GraphicConverter
unless a file has an XPress creator code. a hash table would
be overkill, and is not a native data structure. (a few
people have fooled around with creating hash tables; search
the archives if you really want to use one.)
i think i'd take a closer look at whether GraphicConverter
can handle all the non-XPress types, though. as i
understand, it can only handle EPS by rasterizing it with
Ghostscript. this could be slow and error prone. also, it's
common for an EPS file to have a bounding box larger than
the intended printing size (usually due to sloppy
construction). if this occurs and your database must be
accurate, you may need to hand inspect each EPS.
note also that some types of graphic files may have multiple
pages (PDF, XPress, Freehand native, multipage TIFF). so the
number of pages might be another piece of information worth
extracting.
on the whole, i wonder why you wouldn't juat use a media
database like iView or Cumulus.
--
steve harley 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.