Indigo Rose Software

Professional Software Development Tools

 
Results 1 to 10 of 10

Thread: Progress Meter

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

    Progress Meter

    Hi,

    Is there any example of how to set a Progress Meter text?

    It's for File.Copy : Title, From and To .

    The default setting gives full File Path for FROM and TO. Meaning, leaving users to see something like this :
    FROM : C:\.......\MyFile.doc
    TO : C:\.......\Destination Folder

    I just need to make it look like:
    Copying [MyFile.doc] to Folder [Destination Folder]

    Any help would be appreciated...
    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

  2. #2
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020
    Quote Originally Posted by azmanar
    Hi,

    Is there any example of how to set a Progress Meter text?
    The request for help is for StatusDlg() function and not the Progress Plugin.

    Anyone?
    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

  3. #3
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020
    Anyone ........................?
    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

  4. #4
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    Hi,
    While copying, the path that you get comes from either the "Source" string or the "Destination" string of your File.Copy action.
    You can use the String.SplitPath action to create a table from your strings where the elements (Drive, path, filename and extensions) are separated. From there, it is easy to use the tblSpliteString.Filename (for example) to show the filename only.
    Hope that helps.

    Yossi

  5. #5
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020
    Quote Originally Posted by yosik
    Hi,
    While copying, the path that you get comes from either the "Source" string or the "Destination" string of your File.Copy action.
    You can use the String.SplitPath action to create a table from your strings where the elements (Drive, path, filename and extensions) are separated. From there, it is easy to use the tblSpliteString.Filename (for example) to show the filename only.
    Hope that helps.

    Yossi
    Thanks for responding, Yosik.

    String.SplitPath was what I used. I tried to pass them variables using StatusDlg.SetTitleText and StatusDlg.SetText for contents, but it won't work. I missed something and couldnt figure it out.

    An example is greatly needed.
    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

  6. #6
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    No time to do it now, but could you post your part of the project and I will try and look into it...
    Yossi

  7. #7
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020
    Quote Originally Posted by yosik
    No time to do it now, but could you post your part of the project and I will try and look into it...
    Yossi
    Yosik,

    Thanks for extending a helping hand.

    Here's the code I have problem with:
    Code:
    tSelected = ListBox.GetSelected(LB);
    
    -- because we are not allowing multiple select in the
    -- ListBox object, we are only concerned with tSelected[1]
    
    -- ensure that there is something selected in the ListBox
    if tSelected then
    	-- there is an item selected
    	sFilePath = ListBox.GetItemData(LB, tSelected[1]);
    	proceed = Dialog.Message("Notice", "DO YOU WANT TO COPY :\r\n"..sFilePath, MB_OKCANCEL, MB_ICONINFORMATION, MB_DEFBUTTON1);
    	tFileParts = String.SplitPath (sFilePath);
    	sFileName = tFileParts.Filename..tFileParts.Extension;
    	if proceed ~= IDCANCEL then
    	 sDestinationFolder = Dialog.FolderBrowse("Please Select the Destination Folder", _DesktopFolder)
    			if sFolder ~= "CANCEL" then
    			--copy the file to the folder
    				StatusDlg.SetTitle("Copying File...");
                                    StatusDlg.SetStatusText("Copying file : "..sFileName.."to Folder : "..sDestinationFolder);
    				StatusDlg.ShowProgressMeter(true);
    				StatusDlg.Show();
    				File.Copy(sFilePath, sDestinationFolder, false, true, true, false, nil)
    				-- Check to see if the File.Copy action failed by getting it's error code.
    				error = Application.GetLastError();
    				StatusDlg.Hide();
    
    			-- If it failed (not equal to 0), display a dialog informing the user.
    			-- If it succeeded, open an explore window showing the "Copied Files" folder.
    				if error ~= 0 then
       					result = Dialog.Message("Error", "There was an error copying the files to your system. Please try again.", MB_OK, MB_ICONEXCLAMATION, MB_DEFBUTTON1);
    				else
        				Shell.Execute(sDestinationFolder, "explore", "", "", SW_SHOWNORMAL);
    				end
    	
    			end
    
    	end
    
    else
    	-- Display an error message
    	Dialog.Message("Error", "There is no item selected.");
    end
    Last edited by azmanar; 02-03-2006 at 05:02 AM.
    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

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

    Ok...I go it to work finally. I reassigned those lines into a function and set the function name into the File.Copy callback attribute ( previously NIL ).

    BUT....my not very long text got cut-off, so had to use the \r\n instead, which not the way that I like it to be.

    Can we set the SIZE of the Pop-Up Screen of the Progress Meter in terms of width ( length ) ?
    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
    Jun 2002
    Location
    Israel
    Posts
    1,843
    What about the StatusDlg.SetAutoSize?

    Yossi

  10. #10
    Join Date
    Oct 2004
    Location
    East, South & West Asia
    Posts
    1,020
    Quote Originally Posted by yosik
    What about the StatusDlg.SetAutoSize?

    Yossi
    I missed this function. Now it works.

    Thanks Yossi
    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

Similar Threads

  1. Progress Meter
    By MWMTex in forum AutoPlay Media Studio 5.0
    Replies: 10
    Last Post: 03-12-2008, 11:43 PM
  2. Progress meter with File.Install
    By Sergio_S in forum AutoPlay Media Studio 5.0
    Replies: 7
    Last Post: 12-09-2005, 09:04 AM
  3. Progress Meter Plugin Help
    By MWMTex in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 03-18-2004, 08:25 PM
  4. Spotlight: Progress Meter Object Plugin
    By Desmond in forum AutoPlay Media Studio 5.0
    Replies: 0
    Last Post: 03-10-2004, 03:39 PM
  5. Progress meter VS. StatusDlg
    By arnaud in forum AutoPlay Media Studio 5.0
    Replies: 4
    Last Post: 02-05-2004, 02:16 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