Re: Newbie Progress Bar
Re: Newbie Progress Bar
- Subject: Re: Newbie Progress Bar
- From: Ted Wood <email@hidden>
- Date: Thu, 14 Dec 2000 20:35:58 -0800
Another newbie question. I would like to have a progress bar
displayed as this script runs. The script is adding a suffix to the
file names in a folder.
on AppendSuffix(thefolder, MySuffix)
tell application "Finder"
set myFolderContents to every file of thefolder
repeat with x in myFolderContents
if name of x does not end with MySuffix then
try
set name of x to (name of x & MySuffix)
on error
end try
end if
end repeat
end tell
end AppendSuffix
I tried doing this:
on AppendSuffix(thefolder, MySuffix)
tell application "Finder"
set myFolderContents to every file of thefolder
repeat with x in myFolderContents
-------------------->UpdateGauge()
if name of x does not end with MySuffix then
try
set name of x to (name of x & MySuffix)
on error
end try
end if
end repeat
end tell
end AppendSuffix
On UpdateGauge()
Set setting of gauge "progress" to ((Setting of gauge "progress) + 2)
Tell Gauge "progress" to draw
End UpdateGauge
The script errors and says it does not understand my UpdateGauge().
What am i doing wrong? Or does anyone know of some code i can look
at?
Thanks
I used to have the book "Tao of AppleScript" and it first got me
interested in AppleScript. It came with a CD that contains some cool
osaxen, including a "Progress Bar" osax. For the life of me, I
haven't be able to find the book or CD, and I haven't been able to
come across this osax anywhere on the Internet. I know for a fact,
though, that it would solve your problem easily and quickly.
Does anybody have a copy of the "Progress Bar" osax? Please send it along.
Ted.