Announcement

Collapse
No announcement yet.

new version checker

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

  • new version checker

    hi
    i want to make my app check if therr is new version i my website or not
    i think i have to use json
    but iam beginner also i autoplay media studio
    i just want script which let me when i press in button
    check if in my website online file if there is new update to download
    and i want to ask whats the language are used to write script in AMS
    thanks ..

  • #2
    up for help

    Comment


    • #3
      Hi Welcome,
      As a beginner RTFM before posting !!!!

      Comment


      • #4
        Lmao!

        Comment


        • #5
          OMFG, the image-deletion-genie has struck again.
          Let's try a redux:

          ​​​​​​​@colc,

          LMAO!

          Hmmm, that's better!

          Comment


          • #6
            One simple way is to create an ini/text file on your server, and try something like this:

            Startup action: current_version = "1.0.0.40";

            And then, perhaps use this code in your "Check for Update" button:

            connected1 = HTTP.TestConnection("http://www.somewebsite.org", 20, 80, nil, nil);
            -- If they are connected.
            if connected1 then
            -- Download latest version from online ini file
            HTTP.DownloadSecure("https://www.yourwebsite.net:443/download/mobiversion.txt", _TempFolder.."\\mobiversion.ini", MODE_TEXT, 20, 443, nil, nil, nil);
            -- Note that this ini is in the yourwebsite.net/download/ folder, and must be updated manually.
            Application.Sleep(1000);
            version_data = INIFile.GetValue(_TempFolder .. "\\mobiversion.ini", "mobiurlreplacer", "Version");
            -- If there was no error during the connection:
            if version_data == current_version then
            Dialog.Message("Information", "You already have the latest version which is: ".. version_data .."", MB_OK, MB_ICONEXCLAMATION);

            else
            --version_data = INIFile.GetValue(_TempFolder .. "\\mobiversion.ini", "mobiurlreplacer", "Version");
            -- Application.Sleep(500);
            proceed = Dialog.Message("Update Available", "The latest version is ".. version_data .."\nwhich you may download from www.yourwebsite.net/download.html \n\nDo you want to download it now?", MB_YESNO, MB_ICONINFORMATION, MB_DEFBUTTON1);
            -- If the user clicked YES, then open default download page.
            if proceed == IDYES then
            File.OpenURL("https://www.website.net/download.html", SW_SHOWNORMAL);
            end
            end
            end

            Hope it is of some help. It works for me; let us know if it works for you.



            Classic IT Support
            https://www.classicit.net
            https://www.message7.org

            Comment


            • #7
              Originally posted by John_Klassek View Post
              One simple way is to create an ini/text file on your server, and try something like this:

              ....

              thanks its working

              Comment

              Working...
              X