• 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
variable in subroutine
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

variable in subroutine


  • Subject: variable in subroutine
  • From: Alberto Salvagnini <email@hidden>
  • Date: Mon, 09 Jul 2001 12:46:48 +0200

Hi all,
I wrote the following script to get every folder and every file of a
selected volume/folder.
This works fine, if I watch the script working it finds everything in
every folder and subfolder, but
I can't get the total number of files and folders...
TheFiles and TheFolders return only the number of files and folders on
the first level.
If I call the subroutine from within itself at that moment the value of
TheFolders and TheFiles
should be the current value or not?

Some Suggestion?
Greetings from rainy Hamburg :)
Alberto


copy (choose folder) as string to VolumeToCheck
copy 0 to NumberOfFiles
copy 0 to NumberOfFolders

FindFolder(VolumeToCheck, NumberOfFiles, NumberOfFolders)

--copy NumberOfFiles & " " & NumberOfFolders to x

on FindFolder(currentFolder, TheFiles, TheFolders)
copy (list folder currentFolder without invisibles) to
itemsInCurrentFolder --zeigt alle items in der liste
repeat with currentItem in itemsInCurrentFolder
if folder of (info for (currentFolder & currentItem)) = true then
copy TheFolders + 1 to TheFolders
tell me to FindFolder(currentFolder & currentItem & ":", TheFiles,
TheFolders)
else
copy TheFiles + 1 to TheFiles
end if
end repeat
return (TheFiles & ", " & TheFolders) as string
--return
end FindFolder

[demime 0.98b removed an attachment of type text/x-vcard which had a name of asalvagnini.vcf]


  • Prev by Date: Re: Acrobat's Do Script Command (Insert Pages Doesn't Work In Acrobat 5.0)
  • Next by Date: Re: decimal point placement
  • Previous by thread: Re: Acrobat's Do Script Command (Insert Pages Doesn't Work In Acrobat 5.0)
  • Next by thread: Re: variable in subroutine
  • Index(es):
    • Date
    • Thread