Announcement

Collapse
No announcement yet.

Progress Bar

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Progress Bar

    and yes, its that dreaded bar again, for the life of me, no matter how I use the fucntion, it never works. Been at this on and off for days, any hwlp qould be great. Below is my code. Just need to understand where I am going wrong

    Progress.SetVisible( "Progress1", true)
    function FileProgress(Source, Destination, Copied, Total, FileCopied, FileTotal)
    rounded = Math.Round((Copied/Total) * 100, 1);
    Progress.SetCurrentPos("Progress1", ((Copied/Total) * 100))
    return true
    end

    File.Copy("AutoPlay\\Docs*.*", strFilePath, true, true, false, true, FileProgress);

    Progress.SetVisible( "Progress1", false)

  • #2
    Are the copied files larger than 2 GB? You could run into issues with huge numbers, if I recall correctly.

    Ulrich

    Comment


    • #3
      not, it seems fine, I just cant figure out to display the progress as coping to the object, it copies the files ok. its driving me nuts

      Comment


      • #4
        If this is something for Setup Factory, where this topic was posted, then this code cannot work, as this Lua code is for AutoPlay Media Studio.
        In Setup Factory, you would use actions like
        Code:
        DlgProgressBar.SetRange(CTRL_PROGRESS_BAR_01, 0, 100);
        for setting the control's properties. I assume that you meant to post this in the AutoPlay Media Studio discussion, so I am moving this topic.

        Ulrich

        Comment


        • #5
          Try This example apz

          File Copy with Progress Meter (updated)2.apz

          Comment


          • #6
            Thanks, but the file wont open, so I cant see the changes

            Comment


            • #7
              result = File.GetSize("C:\\MyFile.txt");
              Progress.SetRange("Progress1", 0, result);

              Comment


              • #8
                Thanks a lot, it now makes sense

                Comment

                Working...
                X