Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Join Date
    Jun 2000
    Location
    Indigo Rose Software
    Posts
    1,943

    Custom Progress Dialog

    You will need AutoPlay Media Studio 7.5 in order to use this example.

    With the release of AutoPlay Media Studio 7.5 I thought I would create a quick example that shows how dialogs work, and one possible way to use them in order to show custom progress during a File.Copy() operation. This example will copy the contents of the the project's “AutoPlay\Buttons” folder into the project's “AutoPlay\Audio” folder.

    The majority of the work happens during the CopyFile dialog's “On Show” event. There the example uses the File.Copy() callback function to control the progress bar and set the name of the file that is currently being copied.

    The dialog is shown when the button is clicked using the DialogEx.Show() action and closed after all the files have been copied using the DialogEx.Close() action.

    Again this is a simple example, and not much different then the progress provided by AutoPlay Media Studio's Status Dialog. But if you've ever wanted to customize the Status Dialog before, with AutoPlay Media Studio 7.5 and custom dialogs you can.

    Important Note: When you preview this example the following files will be copied from the project's “AutoPlay\Buttons” folder into the project's “AutoPlay\Audio” folder:

    green_pill.btn
    grey_pill.btn
    grey_rounded.btn
    orange_pill.btn
    red_pill.btn

    No other changes will be made to any files on your system.
    Attached Images
    Attached Files
    MSI Factory The Next Generation Intelligent Setup Builder

  2. #2
    Join Date
    Jan 2001
    Location
    Anderson Island, WA, USA
    Posts
    2,863
    Nice example; shows off the dialogex feature nicely.


    (Click here to contact me)
    Providing Independent Professional Consulting Services for
    IndigoRose products, World Wide.
    Located in -8:00 (-7:00 DST) GMT Timezone (Western United States)

  3. #3
    Join Date
    Aug 2006
    Posts
    355
    This not a sustitute of statusdlag show.... only works by functions with callbakfunction...

    NOT WORK for example with Registry.GetKeyNames...

    On show event, the aplication is blocked during search in keys... any sugestion for customize this tipe of dialog?

    thx

    (sorry for my bad englsih)

  4. #4
    Join Date
    Jun 2000
    Location
    Indigo Rose Software
    Posts
    1,943
    Hi Solmos,

    You are correct this is not a substitute for the Status Dialog and yes it only works with actions that support callback functions. It's simply an example that shows how you can show some custom progress for certain actions.

    As far as I can see, since Registry.GetKeyNames() does not have a callback function and will wait until all key names have been retrieved, there is no way to provide progress using this method.
    MSI Factory The Next Generation Intelligent Setup Builder

  5. #5
    Join Date
    Aug 2006
    Posts
    355
    ok, thanks

    but, not is possible add reg.getkeynames in dialogex in the next update?

    thx

  6. #6
    Join Date
    Jul 2002
    Location
    Just South of Reality
    Posts
    778

    simple Dialog transitions

    Simple transitions of Dialogs are possible. I've attached an example for users to expand upon. Of course this will require AMS 7.5...
    Attached Files

  7. #7
    Join Date
    Jun 2000
    Location
    Indigo Rose Software
    Posts
    1,943
    Neat stuff holtgrewe! Dialogs offer designers a lot of new options. I can't wait to see some of the ideas and tricks that people come up with.
    MSI Factory The Next Generation Intelligent Setup Builder

  8. #8
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020
    Holt,

    This is a fantastic example.

    Thanks.
    Newbie Examples
    ------> AMS 7.5 : amstudio.azman.info
    ----> AMS 6 & 5: www.azman.info/ams/
    ----> FB: facebook.com/GuideToWealth

    ----> Content Development Blog: www.AZMAN.asia

  9. #9
    Join Date
    Sep 2009
    Posts
    4

    what is new?

    Sorry There is no new in this sample??

  10. #10
    Join Date
    Sep 2008
    Posts
    86
    Sounds interesting. recon i will download this and have a look.
    have to wait till i get on the PC.
    AMS not in this lappy...

  11. #11
    Join Date
    Feb 2006
    Location
    syria
    Posts
    44

    thanks

    its very good

  12. #12
    Join Date
    Nov 2010
    Posts
    1
    It is a good example but I have a problem when I try to change the destination does not work I asked for help urgently. thanks
    This is the original code in the example above and I'd put it in another path so I asked someone to help me for all I know I tried and I failed. original example works but when I change the path will not work

    original code:
    ------------------------------------------------------------------------------------------------------------
    function FileProgress(Source, Destination, Copied, Total, FileCopied, FileTotal)
    -- Set the file name
    if (Source ~= "") then
    Label.SetText("FileName", "..."..String.Mid(Source, String.Length(_SourceFolder) + 1, -1));
    end

    -- Update progress
    Progress.SetCurrentPos("Progress1", ((Copied/Total) * 100))
    -- A little bit of time to make the example last longer
    Application.Sleep(200)
    return true
    end
    -- Copy some buttons into the temp directory
    File.Copy(_SourceFolder.."\\AutoPlay\\Buttons\\*.* ", _TempFolder, false, true, true, false, FileProgress)

    -- Done
    DialogEx.Close()
    -------------------------------------------------------------------------------------------------------------
    I would like to C:\Down\ copy all the data on D:\asds\

Similar Threads

  1. Custom Message Dialog
    By Dermot in forum AutoPlay Media Studio 6.0
    Replies: 23
    Last Post: 09-06-2009, 12:13 PM
  2. How to add dialog + custom action on standard uninstall ?
    By alexzfirm in forum MSI Factory 2.0 Discussion
    Replies: 6
    Last Post: 03-26-2009, 01:33 PM
  3. Custom dialog message with checkbox?
    By Protocol in forum AutoPlay Media Studio 7.5
    Replies: 3
    Last Post: 04-04-2008, 01:47 AM
  4. Custom Dialog
    By Julien in forum TrueUpdate 2.0
    Replies: 2
    Last Post: 08-20-2007, 09:45 AM
  5. Custom Dialog Problem - Please !
    By shervin in forum AutoPlay Media Studio 6.0
    Replies: 1
    Last Post: 07-26-2007, 06:36 AM

Posting Permissions

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