Announcement

Collapse
No announcement yet.

Problem with Screen Browse File

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Screen Browse File

    Hi,


    I have a problem. I'm trying to connect SessionVar to the Browse File screen with file version checking. Below the code I'm trying to do. Can you say what's wrong?

    if not g_InstalledVersion then
    _fPath = SessionVar.Expand("%SelectedFolder%");

    g_InstalledVersion = VisualPatch.CheckFolderVersion("%AppFolder%", _fPath);
    if g_InstalledVersion then
    SessionVar.Set("%AppFolder%", _fPath);
    end
    end



    The folder selection screen is in On Startup. CheckFolderVersion is in On Pre Patch,

  • #2
    Just looking at this code extract is insufficient to provide any help. You would at least need to give the error code and message you receive, when you run this script.

    The folder selection screen is in On Startup. CheckFolderVersion is in On Pre Patch
    I am not sure that this is correct. You may want to provide your project file.

    Ulrich

    Comment


    • #3
      Originally posted by Ulrich View Post
      Just looking at this code extract is insufficient to provide any help. You would at least need to give the error code and message you receive, when you run this script.



      I am not sure that this is correct. You may want to provide your project file.

      Ulrich

      It is working now. I properly placed the code. I have another problem. How do I indicate in what path I run the exe file?

      For example:

      currentFolder = //Where I run exe file;

      audioExist = File.DoesExist(currentFolder.."\\langAudioPL.zip") ;
      textExist = File.DoesExist(currentFolder.."\\langTextPL.zip");

      Any ideas?

      Comment


      • #4
        Another question.

        I have a custom window with a progress bar. I want to pin the progress of zip extracting. How do I exactly do this. I'm trying to use the function with CALLBACK however it does not work. I searched the forum thread but nobody wrote about it.


        ControlID CTRL_PROGRESS_BAR_02

        I'm traing something like this:

        function ZipCallback()

        //Can someone write what exactly I have here to write to work?

        end

        Zip.Extract(currentFolder.."\\langAudioPL.zip", {"*.*"}, "%AppFolder%", true, true, "", ZIP_OVERWRITE_ALWAYS, ZipCallback);

        Comment


        • #5
          I recommend that you dedicate some time to check the product documentation, there is a lot of information to be found. You will find a section explaining what Callback functions are and how to use them. Each callback is slightly different, using different parameters.

          In your case, the help file of the Zip plugin states that the Zip.Extract() callback functions needs to accept three parameters: a string for the full destination path of the file being extracted, a number for the percentage, and a number of the meaning of the previous percentage - it may be for the whole package, or just for the current file. This allows you to update a screen with two progress bars, one for the current file, and a second for the progress of the whole package, if you are decompressing more than one file. The callback function needs to return true, or the decompression will not continue. If you return false (for example, if you click the Cancel button on the progress screen), you can abort the decompression.

          Ulrich

          Comment

          Working...
          X