• 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: Newbie Progress Bar
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Newbie Progress Bar


  • Subject: RE: Newbie Progress Bar
  • From: Michelle Steiner <email@hidden>
  • Date: Sat, 16 Dec 2000 09:23:29 -0800

On 12/15/00 5:45 AM, Chad Gray <email@hidden> wrote:

>I placed the "of me" in my script and it works great! Thanks for the help
>everyone. Now i just need to figure out how i can get the gauge to display
>a percentage of the files renamed instead of a fixed number. :)
>
>Thanks again for all the help! Below is the working code.
>
>
>on AppendSuffix(thefolder, MySuffix)
> tell application "Finder"
> set myFolderContents to every file of thefolder

set totalFiles to count of myFolderContents
set y to 0
> repeat with x in myFolderContents

set y to y + 1

> if name of x does not end with MySuffix then
> try
> set name of x to (name of x &
>MySuffix)
> ---------->UpdateGauge(totalFiles, y) of me
> on error
> end try
> end if
> end repeat
> end tell
>end AppendSuffix
>
>on UpdateGauge(totalFiles, y)

set percentage to round (y/totalFiles * 100)

> set setting of gauge "progress" to ((setting of gauge "progress") + 2)

--I'm not familiar with the dictionary of the gauge, so I can't give the
actual code to draw the number.

> tell gauge "progress" to draw
>end UpdateGauge

--Michelle

----------------------------------------------------------------------
| Michelle Steiner | Hard as it may be to believe, my |
| email@hidden | life has been based on a true story. |
----------------------------------------------------------------------


  • Prev by Date: Re: Newbie Progress Bar
  • Next by Date: Re: Find Insertion Point
  • Previous by thread: Re: Newbie Progress Bar
  • Next by thread: Re: Newbie Progress Bar
  • Index(es):
    • Date
    • Thread