Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Oct 2005
    Posts
    572

    how can i do a progress bar in Zip.Add

    how can i do a progress bar in Zip.Add?

  2. #2
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Use the callback function, and you can set the status of a progress bar by the file, or by the whole process.

  3. #3
    Join Date
    Oct 2005
    Posts
    572

    i wont to get the size of the file and......

    i wont to get the size of the new file and check it and set the progress bar but the zip.add get a temp file and i dont no whot file to chek?

    i wont to do a timer thet chek the new file size and set the progress bar but i dont no the name of the file bekose the zip.add put a temp file

    and i dont no how to work whit "callback function"

  4. #4
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Use something like this as your callback:
    Code:
    function ZipCallBack(File, Percent, Status)
    	if Status == ZIP_STATUS_MAJOR then
    		-- update the over all progress bar
    		Progress.SetCurrentPos("OverAllProgress", Percent)
    	else
    		-- update the file's progress bar
    		Progress.SetCurrentPos("FileProgress", Percent)	
    	end
    end

  5. #5
    Join Date
    Oct 2005
    Posts
    572

    i fine this code

    http://www.indigorose.com/forums/sho...&highlight=zip

    but i dont andersten it and wer i put yor code?

  6. #6
    Join Date
    Oct 2005
    Posts
    572

    way the code dont work?

    the code run the progress bar in the zip.add

    -- Display a single-selection file browse dialog
    result = Dialog.FileBrowse(true, "Load File", _DesktopFolder, "Microsoft Word Document (*.zip)|*.zip|All Files (*.*)|*.*|", "", "", false, true);

    -- If CANCEL was not chosen, then let's get the file path
    if (result[1] ~= "CANCEL") then
    Dialog.Message("You chose the following file", result[1]);
    end

    Zip.Add("C:\\2.Zip", result, true, "", 9, ZipCallBack, false);


    function ZipCallBack(File, Percent, Status)
    if Status == ZIP_STATUS_MAJOR then
    -- update the over all progress bar
    Progress.SetCurrentPos("Progress1", Percent)
    else
    -- update the file's progress bar
    Progress.SetCurrentPos("Progress2", Percent)
    end
    end

  7. #7
    Join Date
    Oct 2005
    Posts
    572

    i tray this code and its dont work to

    i tray this code and its dont work to


    -- Display a single-selection file browse dialog
    result = Dialog.FileBrowse(true, "Load File", _DesktopFolder, "Microsoft Word Document (*.zip)|*.zip|All Files (*.*)|*.*|", "", "", false, true);

    -- If CANCEL was not chosen, then let's get the file path
    if (result[1] ~= "CANCEL") then
    Dialog.Message("You chose the following file", result[1]);
    end

    Zip.Add("C:\\2.Zip", result, true, "", 9, ZipCallBack, false);



    function ZipCallBack(File, Percent, Status)
    result444 = Progress.GetCurrentPos("Progress2");

    if Status == ZIP_STATUS_MAJOR then
    -- update the over all progress bar

    Progress.SetCurrentPos("Progress2", result444+1)
    else
    -- update the file's progress bar
    Progress.SetCurrentPos("Progress2", result444+1)
    end
    end

  8. #8
    Join Date
    Oct 2005
    Posts
    572

    Smile it's work goooooood thenks to all

    function CallBack (sPath, nPercent, nStatus)
    if nStatus == ZIP_STATUS_MAJOR then
    Progress.SetCurrentPos("Progress1", nPercent);
    end
    end

    tFiles = Zip.GetContents("AutoPlay\\Docs\\file.zip", false);

    Zip.Extract("AutoPlay\\Docs\\file.zip", tFiles, _TempFolder, false, false, "", ZIP_OVERWRITE_ALWAYS, CallBack)

  9. #9
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Functions need to be defined before they can be called. If you're not going to put the function in the "Global" area, then it needs to be in your code before you call it.

    Code:
    -- Good
    function Test()
       return "Good"
    end
    
    Dialog.Message("Sample", Test())
    Code:
    --BAD
    
    Dialog.Message("Sample", Test())
    
    function Test()
       return "Bad"
    end

  10. #10
    Join Date
    Oct 2005
    Posts
    572

    O.K but way the zip.add dont work

    function CallBack (sPath, nPercent, nStatus)
    if nStatus == ZIP_STATUS_MAJOR then
    Progress.SetCurrentPos("Progress1", nPercent);
    end
    end

    dany = "c:\\1.doc";
    ddd = {dany};
    Zip.Add("c:\\1121.zip", ddd, true, "", 5, CallBack, true);

  11. #11
    Join Date
    Oct 2005
    Posts
    572

    Grin please way the code dont work

    please way the code dont work

  12. #12
    Join Date
    Oct 2005
    Posts
    572

    Huh? help me

    help me

  13. #13
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    I'd gladly help you, but I don't understand what you are asking or what is wrong. It'd be a lot easier if you posted an APZ for us to look at.

  14. #14
    Join Date
    Oct 2005
    Posts
    572

    i send you the file

    i send you the file
    Attached Files

  15. #15
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Ahhhh, I see the problem, you have recurse set to true, which makes the Zip.Add function look in every sub folder of the one specified, in this case C:\.

    Change that to false, and you're good to go.
    Zip.Add("c:\\test.zip", zipadd, true, "", 5, CallBack, false);

Page 1 of 2 1 2 LastLast

Similar Threads

  1. FTP Plugin and Progress Bar
    By Roboblue in forum AutoPlay Media Studio 6.0
    Replies: 4
    Last Post: 03-27-2006, 03:55 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. Flash progress bar for Mediaplayer object
    By feilong in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 03-21-2003, 03:12 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