Re: traversing handlers aren't returning value
Re: traversing handlers aren't returning value
- Subject: Re: traversing handlers aren't returning value
- From: Bastiaan Boertien <email@hidden>
- Date: Tue, 11 Jan 2005 09:20:14 +0100
Hello Eric
The problem is your return inside a handler. if you use "return" in a Handler, you stop the handler and return a value from your handler. So your loop will not be continued.
I modifiied the script a little i made a handler at the bottom of this script
greetings bastiaan
set the foldr to (
choose folder)
set ft to ""
--
Find text folders
tell application "Finder"
set text_folders_only to folders of the foldr whose name contains "text"
end tell
set ft to text_folders_only,
ft)
--
---- Handlers -----
--
Process folders, no font folders. filters "fol" down
on foldrlist,
ft)
repeat with thisFolder in foldrlist
say (
name of thisFolder as string)
tell application "Finder"
set fils to files of thisFolder
set fols to (
folders of thisFolder whose name does not contain "font")
end tell
if fils = {}
then
say "no files in, " & (
name of thisFolder as string)
else
fils)
end if
fols,
ft)
ft)
end repeat
end processFolders
on filesToBeProcessed)
set creetor to ""
set ft to ""
repeat with thisFile in the filesToBeProcessed
say "processing " &
name of thisFile as string
set creetor to file creator of (
info for file (
thisFile as string))
if creetor is "XPR3"
then
set ft to "Quark 4.11, Mac"
ft)
else if creetor is "Fm70"
then
set ft to "FrameMaker 7.0, Mac"
ft)
else if creetor contains "InDn"
then
set ft to "InDesign CS, Mac"
ft)
end if
end repeat
end ProcessFiles
on ft)
say "result is" &
ft as string
end sayIt
_______________________________________________
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