Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Testing for a specific value in a folder name



Title: Re: Testing for a specific value in a folder name
At 12:13 PM +1100 7/5/06, Brett Conlon wrote:
Hiya,

I have a word list  (taked from a folder name) and I want to test for a spoecific word in it. The folder name goes like this:

21 Move Title D12345 33 41 BC

I want to test if the D number is present. So far I've coerced the name to a word list but I can't get the syntax to find a word beginning with D and has numbers after it. The D number is not alwats 5 characters either - older jobs had 4 characters.

Later I want to use this to check that the construction file (Quark/Freehand etc) they have in that job folder has the same D Number.

Here's what I have so far but the last line errors....

More like this, I think:
set aFolder to (choose folder)
set D to CheckDNum(aFolder)
to CheckDNum(F)
    tell application "Finder"
        set N to name of F
        set w to words of N
        repeat with aW in w
            if first character of aW is "D" then return rest of characters of aW as string as integer
       end repeat
    end tell
end CheckDNum


Many thanks,

Coj

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/bellac%40accesscable.net

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden

References: 
 >Testing for a specific value in a folder name (From: Brett Conlon <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.