Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2007
    Posts
    1

    Progress Bar Problem

    Hi,
    I need some help with progress bar problem

    This coding I attach is the current coding that I used.
    And I think it's not effective..
    I have to call
    "DlgProgressBar.Step(CTRL_PROGRESS_BAR_01)
    File.Copy(_SourceDrive.."\\test\\ab.exe", myfolder.."\\test",true, true, false, true, nil);"
    everytime for each kind of files i want to copy..
    i do need some assistant on this uneffectiveness..

    Code:
    myfolder = SessionVar.Expand("%AppFolder%");
    DlgProgressBar.SetRange(CTRL_PROGRESS_BAR_01, 0, 26);
    DlgProgressBar.SetStep(CTRL_PROGRESS_BAR_01, 1);
    Folder.Create(myfolder.."\\test");
    DlgProgressBar.Step(CTRL_PROGRESS_BAR_01);
    File.Copy(_SourceDrive.."\\test\\ab.exe", myfolder.."\\Resource", true, true, false, true, nil);
    DlgProgressBar.Step(CTRL_PROGRESS_BAR_01);
    File.Copy(_SourceDrive.."\\test\\ac.exe", myfolder.."\\Resource", true, true, false, true, nil);
    DlgProgressBar.Step(CTRL_PROGRESS_BAR_01);
    File.Copy(_SourceDrive.."\\test\\\ad.exe", myfolder.."\\Resource", true, true, false, true, nil);
    DlgProgressBar.Step(CTRL_PROGRESS_BAR_01);
    File.Copy(_SourceDrive.."\\test\\ae.exe", myfolder.."\\Resource", true, true, false, true, nil);
    DlgProgressBar.Step(CTRL_PROGRESS_BAR_01);
    File.Copy(_SourceDrive.."\\test\\af.exe", myfolder.."\\Resource", true, true, false, true, nil);
    DlgProgressBar.Step(CTRL_PROGRESS_BAR_01);
    File.Copy(_SourceDrive.."\\test\\ag.exe", myfolder.."\\Resource", true, true, false, true, nil);
    DlgProgressBar.Step(CTRL_PROGRESS_BAR_01);
    File.Copy(_SourceDrive.."\\test\\ah.exe", myfolder.."\\Resource", true, true, false, true, nil);

  2. #2
    Join Date
    Apr 2001
    Location
    Haverhill, Suffolk, UK
    Posts
    360
    a) If the files you are copying are not already on the machine then you really should be using the Archive or Extract tabs, or if in a zip file the ZIP.EXTRACT command. I'm saying this for the benefit of others and looking at your code I see you appear to be copying from one folder to another.

    b) I think you need to look at the CALLBACK function which you are not using at the moment by fact you have nil as the last parameter. From that the system returns the name of the file being copied and how far through it has got (returning bytes copied and total file bytes) from which you can update the progress bar as a percentage. Other values are also returned depending upon the function being used.

    Whilst the File.Copy does not have an example of the CALLBACK function (which really it should have), do a search in the Help File for Callback Function Examples. A similar process will work for File.Copy so for every file you can show how far it has copied.

    John

Similar Threads

  1. progress bar is not showing the right stuff
    By Twister11 in forum Setup Factory 7.0
    Replies: 12
    Last Post: 07-04-2006, 06:12 AM
  2. Tutorial request for flash progress bar.
    By 4thstar in forum AutoPlay Media Studio 6.0
    Replies: 17
    Last Post: 12-06-2005, 11:44 AM
  3. Progress bar while executing batch file
    By StealthShadow in forum Setup Factory 7.0
    Replies: 3
    Last Post: 10-25-2005, 09:59 PM
  4. Progress Bar...
    By tealmad in forum Setup Factory 7.0
    Replies: 14
    Last Post: 02-05-2005, 12:51 PM
  5. Progress Bar Display Problem
    By markstaylor in forum AutoPlay Media Studio 5.0
    Replies: 3
    Last Post: 11-09-2004, 08:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts