difficulty with list filtering
difficulty with list filtering
- Subject: difficulty with list filtering
- From: "Patrik B." <email@hidden>
- Date: Sun, 13 May 2007 02:38:56 -0700
Trying to filter through a list and am almost there, just need a little help.
The problem I have is:
1) I can only check if A is contained in B. A is defined as "GER" but B is
defined as {"ENG", "SPA", "GER", "FRE") etc. so my script currently finds
alterations of it i.e. "enG", "GEr", "FRI" however how do I make it so it also
detects "GGER", "blablah-GER-jkj" i.e. any variation of preceeding text or
following text is not ignored as it is really "contained" in it.
here is the part of my code I want to improve:
repeat with prefix in my myprefixlist
repeat with aName in my mymasternames
set temp to (contents of aprefix & "-" & contents of (my
bust4charinname(aName))) -- the bust 4 is a handler that removes an existing 4
character prefix
considering case
if (temp as text) is not in (my filenames as text) then -- this part works
great but it does not detect added characters before and after the name.
if (temps as text) is not in (my missingfiles as text) then
set end of my missingfiles to temp -- if file is not present
end if
end if
end
end
end
The purpose is that I have an Enlgish file that has template images dropped
into it. Now before I want to run my make 15 versions script and have that
pdf'ed on the fly I want to check if the images are in actual fact there and
are named right. my versioned images are in the same path as the originals but
have different prefixes only. My script is meant to detect files that are
meant to be there but are not based on my master file list. So far so good all
is detected except for occurences of files that contain the right wording but
have more characters before or after. Any ideas on how I can filter this out
so I only get a report back on what is missing and only 100% matches. Again
see my code above. Ideally I would not use scripting additions but if this can
be done easier with acme let me know how I would do that too.
Best, Patrik
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden