Okay, so the secrets are 

set AppleScript's text item delimiters to {"/"}

so the front document's path can be deconstructed into components, and

set fileNames to do shell script "ls " & dPath
set fileNames to paragraph 1 of fileNames

where "dPath" was the path, backtracked to the enclosing directory, and 
appending "/Art/*" & selectedText & "*". Thus letting UNIX do the nightmarish 
iteration of the directory.

It turned out not to be horrible.

        — F

On 30 Apr 2011, at 5:37 PM, Fritz Anderson wrote:

> I used Ruby because AppleScript is an <inexpressible-by-a-gentleman>ing 
> nightmare for iterating directories and manipulating strings.

-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to