Poll: Favorite way to update script

Results 1 to 7 of 7

Thread: Favorite script updating method

  1. #1
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default Favorite script updating method

    So a few people and I were talking about on skype recently about our favorite way to keep scripts up to date, and we had conflicting opinions about it. So if you could vote on how you prefer your scripts to be updated I'm sure it will be useful to script writers to see what the general thoughts of this are.

    Please only vote if you download scripts here to use, as I want this to be the opinion of users and not scripters!
    Last edited by Kyle; 10-21-2014 at 02:34 AM.
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  2. #2
    Join Date
    Mar 2013
    Location
    Argentina
    Posts
    758
    Mentioned
    27 Post(s)
    Quoted
    365 Post(s)

    Default

    Quote Originally Posted by elfyyy View Post

    No auto updating, if the script is outdated, you will have to manually download new one from thread.

    Script checks if it is outdated, tells you to download new on from thread.

    Script auto updates, overwriting the previous version.

    Script auto updates, with a new file name with the version in it to prevent overwriting.
    number one: i dont mind

    number two: better than number one

    number three: NEVER overwrite, i probably touched it a lot (antiban, breaking, that kinda stuff)

    numbre four: best. although im between number two and this one

  3. #3
    Join Date
    Dec 2011
    Location
    East Coast, USA
    Posts
    4,231
    Mentioned
    112 Post(s)
    Quoted
    1869 Post(s)

    Default

    autoUpdateMe(), no overwriting

    Like Asha's scripts, "SCRIPT HAS BEEN UPDATED, USE (FILENAME).SIMBA!!!"
    GitLab projects | Simba 1.4 | Find me on IRC or Discord | ScapeRune scripts | Come play bot ScapeRune!

    <BenLand100> we're just in the transitional phase where society reclassifies guns as Bad™ before everyone gets laser pistols

  4. #4
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

    Default

    Quote Originally Posted by KeepBotting View Post
    autoUpdateMe(), no overwriting

    Like Asha's scripts, "SCRIPT HAS BEEN UPDATED, USE (FILENAME).SIMBA!!!"
    yes my way or the highway!

    i like either the autodl overwrite or the autodl with new version in title in a new file (what i use). less work for everyone

  5. #5
    Join Date
    Jun 2014
    Location
    Oklahoma
    Posts
    336
    Mentioned
    22 Post(s)
    Quoted
    231 Post(s)

    Default

    meh, I can see how auto updating helps people who are frightened by code.. But, I almost always end up commenting out the autoupdate() procedure... I'm going with 1.

  6. #6
    Join Date
    Aug 2014
    Location
    Australia
    Posts
    932
    Mentioned
    53 Post(s)
    Quoted
    495 Post(s)

    Default

    *sigh* I have to be the guy who accidentally voted for the wrong option. FML. I voted for #3 , overwrite, but I meant to vote for #4 . I don't think there's anything wrong with auto-updating as long as it's non-intrusive. I mean honestly, you download a script, run it, close it, delete/keep the previous version, open the new one, then run it. It takes a total of 10 seconds at most and you don't have to go through the hassle of finding the thread and downloading the new script.

    AutoUpdateMe ftw!



    New to scripting? Procedures & Functions for Beginners
    Do you use your computer at night? Just get f.lux

  7. #7
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    I updated AutoUpdateMe little bit.

    Added:
    Msg & DialogBox.
    Restart Simba.

    Some other stuff.


    Simba Code:
    procedure AutoUpdateMe(ScriptName, ScriptVer, VerURL, SourceURL: string);
    var
      TProc :TProcess;
      I, iFile: Integer;
      CurrVer, NewScript, FileName: String;
      ArgArr :TStringArray;
    begin
      CurrVer := GetPage(VerURL);
      if (Trim(CurrVer) > ScriptVer) then
      begin
        if (MessageDlg('Update Available', ScriptName + ' ' + CurrVer + ' is Available for Download' + Chr(13) + 'Would you like to Download?', mtInformation, [mbYes, mbClose]) = 11) then
          Exit;
        NewScript := GetPage(SourceURL);
        FileName := ScriptPath + ScriptName + ' ' + CurrVer + '.simba';
        iFile := Rewritefile(FileName, True);
        try
          WriteFileString(iFile, NewScript);
        except
          begin
            MessageBox('Unable to download ' + ScriptName + ' ' + CurrVer + '.simba', 'Error!', 8);
            TerminateScript;
          end;
        end;
        CloseFile(iFile);

        ArgArr := ['/c ' + AppPath + 'Simba.exe' + ' -o ' + '"' + FileName + '"' + ' -r', ' /c Taskkill /PID ' + IntToStr(GetProcessID) + ' /F']

        If (MessageDlg('Script Successfully downloaded!', ScriptName + ' ' + CurrVer + ' has been downloaded.' + Chr(13) + 'To complete the update you must restart the script. Would you like to restart the script now?', mtInformation, [mbYes, mbClose]) = 11) then
          Exit;

        for I := 0 to 1 do
        begin
          TProc.Init(nil);
          TProc.setExecutable('Cmd.exe');
          TProc.getParameters().Add(ArgArr[I]);
          TProc.Execute();
          TProc.Free();
        end;
      end;
    end;

    begin
      AutoUpdateMe('Ashaman Herblore', '0.1', 'http://ashamanherblore.googlecode.com/git/Version.txt', 'http://ashamanherblore.googlecode.com/git/AshamanHerblore.simba')
    end.


    ~Home

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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