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




On Jul 4, 2006, at 6:13 PM, Brett Conlon wrote:

on CheckDNum(aFolder)

        tell application "Finder"

                set item_name to the name of aFolder as text

                set AppleScript's text item delimiters to " "

                set AllWords to every word of item_name as list

                log AllWords

                set Dnum to every word of AllWords whose character 1 is 

"D"

        end tell

end CheckDNum


on CheckDNum(aFolder)
tell application "Finder"
set item_name to name of aFolder --the name of aFolder
repeat with this_word in words of item_name
considering case
if contents of this_word begins with "D" then
try
return text 2 through end of this_word as integer
end try
end if
end considering
end repeat
end tell
end CheckDNum

-- 
"The optimist proclaims that this is the best of all possible worlds ;
and the pessimist fears this is true."  --James Branch Cabell

Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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.