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: Droplet



Hi Michelle,


this use Satimage regexp and may have some limitations if you select files that are not at the same level 
or folders whose name ends with your volume name: dropped file "macintosh_HD:back_up_of_macintosh_HD:" 
ciao

Luca

on open these_items
set folderList to {}
set fileList to {}
tell application "Finder"
set mylist to (every item of these_items) as string
set myHOME to container of item -1 of these_items as text
end tell
set myitems to change myHOME in mylist into return & myHOME
try
set folderList to find text ".+:$" in myitems with regexp, all occurrences and string result
end try
try
set fileList to find text ".+[^\\:]+$" in myitems with regexp, all occurrences and string result
end try
set result_list to {"-files-"} & fileList & {"-folders-"} & folderList
set mychoice to choose from list result_list
end open











On 06/apr/06, at 00:20, Michelle Steiner wrote:

Well, I wound up doing it with a loop.

on open (ItemList)
set FileList to {}
set FolderList to {}
tell application "Finder"
repeat with thisItem in ItemList
if kind of thisItem is "folder" then
copy thisItem to end of FolderList
else
copy thisItem to end of FileList
end if
end repeat
end tell

my processFiles(FileList)
repeat with thisFolder in FolderList
my splitFoldersFromFiles(thisFolder)
end repeat
end open

on splitFoldersFromFiles(inputFolder)
tell application "Finder"
my processFiles(get files of inputFolder)
set FolderList to folders of inputFolder
repeat with thisFolder in FolderList
my splitFoldersFromFiles(thisFolder)
end repeat
end tell
end splitFoldersFromFiles

on processFiles(FileList)
repeat with thisFile in FileList
tell application "Finder"
set extension hidden of thisFile to true
end tell
end repeat
end processFiles

-0- Michelle
-- 
Chastity always takes its toll. In some it produces pimples; in others, sex laws. -- Karl Kraus

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

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: 
 >Re: Droplet (From: Michelle Steiner <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.