Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2001
    Location
    Harrisburg, PA , USA
    Posts
    114

    file.copy error "Operation aborted by user."

    I am getting this error when I trace my SF7 program "Operation aborted by user." I a'm trying to create a custom progress screen for a copy command.

    I have fought and fought this with no consistant results but this is the most recent error.

    By the way. The trace did not not show the copy going to the callback(fileprogress) until I'm made my most recent set of changes.

    --debugging script
    Debug.SetTraceMode(true);
    Debug.ShowWindow(true);

    --Status Show
    StatusDlg.Show(MB_ICONNONE, true);
    StatusDlg.ShowProgressMeter(true);
    StatusDlg.ShowCancelButton(false, "Cancel");

    -- Note: this is normally where you would put the actions
    -- that you want this screen to perform (i.e. the
    -- actions that you want to show the progress of).

    -- Tip: use the DlgProgressBar actions (such as SetRange,
    -- SetPos and Step) to make the progress bars reflect
    -- the current status of your actions.
    -- These actions are performed whenever progress is made while the setup is installing files.

    -- copy files here.
    Folder.Create("H:\\"..BCKUPDIR);
    Folder.Create("H:\\"..BCKUPDIR.."\\My Documents\\");
    MDF = Shell.GetFolder(SHF_MYDOCUMENTS);
    File.Copy(MDF.."\\*.*", "H:\\"..BCKUPDIR.."\\My Documents\\", true, true, false, true, fileprogress);


    --defined function to display files

    function fileprogress(tSource, tDestination, tCopied, tTotal, tFileCopied, tFileTotal)

    shortsource = String.AbbreviateFilePath(tSource, 72);


    StatusDlg.SetMeterRange(1, tTotal);

    StatusDlg.SetStatusText(shortsource);
    StatusDlg.SetMeterPos(tCopied);

    return false

    end

  2. #2
    Join Date
    Jan 2000
    Posts
    2,002
    Move the fileprogress function above the File.Copy call. The problem is that the File.Copy is being called before the callback function is defined and therefore you are passing through nil as the function argument since it is undefined.

  3. #3
    Join Date
    Jul 2001
    Location
    Harrisburg, PA , USA
    Posts
    114
    Way cool! I got most everything fixed, even the "duh" mistakes. I also changed the actions in the function "fileprogress" so that I can use Progress screen with two bars..

    My ego has gone through the roof.

    Thanks Brett!!

Similar Threads

  1. no log if aborted
    By SpaceStationAlpha in forum Setup Factory 6.0
    Replies: 0
    Last Post: 05-04-2002, 02:26 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