• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: traversing handlers aren't returning value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: traversing handlers aren't returning value
      • From: Eric Geoffroy <email@hidden>
References: 
 >traversing handlers aren't returning value (From: Eric Geoffroy <email@hidden>)

  • Prev by Date: Re: FileMaker 7 AppleScript problems...
  • Next by Date: RE: forbidden characters in applescript
  • Previous by thread: traversing handlers aren't returning value
  • Next by thread: Re: traversing handlers aren't returning value
  • Index(es):
    • Date
    • Thread