copy progress bar; windows
bob at armbase.com
Mon Dec 22 06:11:51 CST 2003
At 22:05 21/12/2003, you wrote:
>Revolution has a progress bar object - it is a variation of the scrollbar
>so you can get to it in the Tools palette by holding down the mouse button
>on the scrollbar button until the sub-menu pops out and offers you the
Sarah AGAIN :-))))
>When you have made your progress bar, there are two properties you need to
>control programmatically: endValue and thumbPosition
>The easiest way is just to use the file count, unless you want to get
>really fancy and use the file size as well. Assuming you are going for
>file count, I have added some extra lines to your script below:
>> answer folder "Please choose a folder:"
>> put it into destFolder
>> set the itemDelimiter to "/"
>> put field 1 into theFiles
>put the number of lines in theFiles into fileCount
>set the endValue of scrollbar "Progress" to fileCount
>set the thumbPosition of scrollbar "Progress" to 0
>show scrollbar "Progress"
>put 0 into currentFileNumber
>> repeat for each line f in theFiles
>> put destFolder & "/" & last item of f into newFile
>> revCopyFile f, newFile
>add 1 to currentFileNumber
>set the thumbPosition of scrollbar "Progress" to currentFileNumber
>> end repeat
>set the thumbPosition of scrollbar "Progress" to \
> the endValue of scrollbar "Progress"
>hide scrollbar "Progress"
This works (almost perfectly). Thank you very much. The updated application
Now there is one slight problem (well not a problem)
the progress bar is visible on startup and onthe first search, hoewever if
you do a second file-transfer the progress bar only appears when the
transfer is completeing not before and after.
This is NOT a problem :-) just an asthetic thing.
PS I'm going ot get to grips with revolution a bit over the christmas break
if my laptop holds out. (screen has an fl-inverter problem , toshiba design
these snippets of code you have given me are invaluable for learning..
bob; Sunny Scotland
More information about the use-livecode