[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] VCard - Seek and destroy script



At 12:01 AM +0200 8/12/00, Bart Lateur wrote:
>On Fri, 11 Aug 2000 14:19:51 -0400, Chris Nandor wrote:
>
>>>I would think that it would be easier and more reliable to hard code the
>>>path to where the .vcf files are likely to be, in a global variable set at
>>>the top of seek and destroy scripts.  (Of course, then a CD becomes a bad
>>>venue from which to run the script.)
>>
>>Well, yes, you can set $dir there to be whatever you want.
>
>Once.
>
>I'm pretty sure that John implied using it on another computer.
>
>Are there ways to make Eudora tell you it's directory settings? In that
>case, AppleEvents can help and tell you.
>

There's an x-setting that will tell you the name of the attachment 
folder.  There's a second x-setting that will tell you the volume 
name and DIRECTORY ID of the download folder.  I haven't taken the 
time to parse that into a useable folder reference, but here's the 
applescript to get both of them...

tell application "Eudora" to {setting 43,setting 45}

This will return something like {"Downloads", "toothgnip:5231"}.

So, this will tell you where to find the Eudora attachments folder. 
(For more info on Eudora x-settings, see 
http://www.eudora.com/techsupport/mac/download/X-Eudora-Settings.txt)

>If you must do it by hand, why not put a "kill VCF files" file with
>hardcoded file paths in the preferences folder. Simple format: one per
>text line. You can fall back onto the default search, maybe even create
>a default preferences file, if one doesn't exist.
>
>But File::Find probably still is easier than traversing each directory
>by handwritten code.

I definately agree with that (and I hope Vicki doesn't mind...:-). 
I've replaced three page programs with ~2/3 page code by switching to 
File::Find.  And it's easier to read, too.  Of course, they were 
*really* bad programs.

-Jeff Lowrey

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org