Newbie Progress Bar
Newbie Progress Bar
- Subject: Newbie Progress Bar
- From: Chad Gray <email@hidden>
- Date: Thu, 14 Dec 2000 14:38:32 -0500
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