Re: How can I display the number of records processed using a thermometer
Re: How can I display the number of records processed using a thermometer
- Subject: Re: How can I display the number of records processed using a thermometer
- From: Christopher Stone <email@hidden>
- Date: Mon, 5 Jan 2004 19:42:17 -0600
Hello Mark,
At 18:34 -0600 01/05/2004, Mark Clyma wrought:
If possible I would like to display a message box that shows the total
number of files that will be processed and the current number of files
that have been processed (EX.: 15 files out of 180 have been processed).
It would be great if I could also display a horizontal "thermometer"
that visually shows the current number of files that have been processed.
My questions are:
1. Is there a quick easy way to get the total number of files found in
a folder and all of its sub-folders? This would be for initially
displaying the total number of records (files) needed to be processed.
set fl to alias "Disk:Downloads - New: Eudora Attachments:"
tell application "Finder"
set fileList to (files of entire contents of fl whose name extension
is "html") as alias list
end tell
set fCnt to count of fileList
You now have your file list to process and a count of it.
2. Is there some Applescript code that shows how to build/display a
horizontal "number of records processed" thermometer?
I'm unaware of a non-osax method of doing this except building an
AppleScript Studio application.
The simplest way would probably be to buy the 24U Appearance osax ($36.00)
http://www.24uSoftware.com/AppearanceOSAX
There is a good example for building a progress dialog.
Oh, you could use a scriptable application like TextEdit
(<horrors/shudder>) or Tex-Edit Plus to display the information textually:
tell application "TextEdit"
activate
tell front document
set its text to "Total files to process: " & 10 & return & return &
"Files processed: 0"
repeat with i from 10 to 0 by -1
set its last paragraph to ("Files processed: " & i)
delay 0.25
end repeat
end tell
end tell
If you're running the script from Script Editor 2, Smile, or Script
Debugger you can use the editor's own windows for such feedback.
Chris
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.