Page 7 of 8

Re: XYplorer Automatic Updater

Posted: 11 Jul 2011 08:28
by carmenm
thanks a lot for the fix!

Re: XYplorer Automatic Updater

Posted: 27 Aug 2011 10:23
by gtm
Updating of the ini file works with the fixes above thanks !


However the script itself is not working correctly (not due to above fixes, but generally).

http://www.xyplorer.com/download.php shows
XYplorer 10.10.0100
28-Jul-2011

But this script showed this window below in the attachment.
AutoUpdater.jpg
AutoUpdater.jpg (82.93 KiB) Viewed 4364 times

Re: XYplorer Automatic Updater

Posted: 30 Mar 2012 15:18
by mithrin
gtm

if you do the mod on post 2040 page 6 and change your ini file to Beta=1 the updater should work.
It seems jacky hasn't fix the 10 bug for non Beta versions.

******************************************************************************************

I got it to work but then your in the same boat as the others, common-jacky.xys wont load as a library script any more.

So change the folling code in XYplorer Automatic Updater.xys

/* .htm brings in a different page to the one needed under .php */

Code: Select all

175	readurl $page, "http://www.xyplorer.com/download.php";
/* The adds the extra digit to cope with the number 10. */

Code: Select all

179	regexreplace $XYAU_new_version, $page, ".+?<b>XYplorer ([0-9]{2}\.[0-9]{2}\.[0-9]{4})</b>.+", 
I did see references to other code that look like thay need to be changed too but I'll wait to see what jacky says..

Code: Select all

    #.##.#### maybe should be ##.##.####
    xyplorer_([0-9]\.[0-9]{2}\.[0-9]{4}) maybe should be xyplorer_([0-9]{2}\.[0-9]{2}\.[0-9]{4})
I think jacky made a small blunder, programming wise, not being able to cope with a version number no greater than 9.99.9999.

Re: XYplorer Automatic Updater

Posted: 30 Mar 2012 17:29
by avsfan
Strange -- my automatic updater has suddenly stopped working (no changes to anything, as far as I know).

The error that it fails with is an error box that states: In order to accomplish the desired operation, you need to have the "library" common-jacky.xys installed -- Please download the script file and put it in the same folder as this script file (c:\bin\XYPlorer\Scripts\).

The curious thing about this is that common-jacky is still in that directory -- no changes...

I can still update manually, but the automatic version is so much more FUN! :)

Any ideas?

Re: XYplorer Automatic Updater

Posted: 30 Mar 2012 18:08
by highend
no changes to anything
Some scripting command changes in the last few betas, one of them is responsible.

xyplorer_10.90.0102_noinstall was still working, xyplorer_10.90.0203_noinstall isn't.

Didn't update in the meantime.

Re: XYplorer Automatic Updater

Posted: 30 Mar 2012 18:51
by j_c_hallgren
mithrin wrote:It seems jacky hasn't fix the 10 bug for non Beta versions.
i think jacky has abandoned us here as his last posting is from July 2011 and he used to be here multiple times daily so we'll likely have to rely on our other current scripters to provide updates and fixes to this.

Re: XYplorer Automatic Updater

Posted: 30 Mar 2012 20:15
by Marco
I've done something similar and independently (albeit very basic) here http://www.xyplorer.com/xyfc/viewtopic.php?f=3&t=7880
HTH

Re: XYplorer Automatic Updater

Posted: 30 Mar 2012 22:08
by highend
The good thing about the "original" one (from this thread) is, that it displays the changelog and I really like that feature!

Re: XYplorer Automatic Updater

Posted: 30 Mar 2012 22:29
by lukescammell
avsfan wrote:Strange -- my automatic updater has suddenly stopped working (no changes to anything, as far as I know).

The error that it fails with is an error box that states: In order to accomplish the desired operation, you need to have the "library" common-jacky.xys installed -- Please download the script file and put it in the same folder as this script file (c:\bin\XYPlorer\Scripts\).

The curious thing about this is that common-jacky is still in that directory -- no changes...

I can still update manually, but the automatic version is so much more FUN! :)

Any ideas?
Yeah I have this problem as well - sucks. Just haven't got around to reporting it/looking into why it's broken.

Re: XYplorer Automatic Updater

Posted: 31 Mar 2012 20:52
by mithrin
I found this Thread called "Scripting Bugs" in Bug Reports. Should this non - loading of library script be reported there?

If so would one of the more senior members do it.

Re: XYplorer Automatic Updater

Posted: 02 Apr 2012 12:57
by TheQwerty
mithrin wrote:I found this Thread called "Scripting Bugs" in Bug Reports. Should this non - loading of library script be reported there?

If so would one of the more senior members do it.
That thread is for Bugs in XY's scripting engine, not for those within user created scripts - so no it shouldn't be posted there.

EDIT: So I took a look into the error... brace yourselves. :biggrin:

Obviously, this script is extremely out of date by now - personally I stopped using it last September.

The main problem with the script is it was written during the time when XY was transitioning from scripting commands:

Code: Select all

command $output, $input, $args;
To functions:

Code: Select all

$output = command($input, $args);
Many of the old commands were replaced with equivalent functions, but to maintain backwards compatibility the command versions were only marked deprecated and not removed.

During that time this script should have been updated to the new syntax, but jacky is no longer active around here and no one else took the reigns.

Last month Don introduced a new parameter to the GetKey function and then removed it days later:

Code: Select all

v10.90.0102 - 2012-03-14 13:36
    + SC getkey enhanced: Added optional parameter flags.
      Syntax: getkey(key, section, [INIfile], [flags])
        flags:  1: Use XYplorer's native algorithm.
      Notes:
      - XYplorer's native algorithm for reading INI values will return 
        leading TAB characters. The standard Windows algorithm will not.
      - XYplorer's native algorithm is optimized for reading hundreds of 
        keys out of huge INI files. It's not made for picking out single 
        keys as the getkey() function does. So, performance-wise you 
        will suffer a bit for the added functionality.
      Examples where Year=[TAB]2012:
        // returns "2012"
        text getkey("Year", "Vacation", "<curpath>\holiday.ini");
        // returns "[TAB]2012"
        text getkey("Year", "Vacation", "<curpath>\holiday.ini", 1);
...
v10.90.0105 - 2012-03-17 20:19
    ...
    * SC getkey: Removed the optional parameter flags added recently in 
      v10.90.0102. Instead the function now always behaves as if 
      flags=1, i.e. leading TAB characters in values are returned and 
      not cropped.
This broke the backwards compatibility for the deprecated command as the scripting engine now saw the old:

Code: Select all

getkey $output, $key, $section, $INIfile;
As the new function without the output being captured:

Code: Select all

getkey($key, $section, $INIfile, $flags);

TL;DR: Every instance of GetKey within the scripts needs to be re-written to convert them from:

Code: Select all

getkey $output, $key, $section, $INIfile;
to:

Code: Select all

$output = getkey($key, $section, $INIFile);
That's a first step, maybe it will work after that, maybe not.
This should also be done for all other deprecated commands that were converted to functions.

Re: XYplorer Automatic Updater

Posted: 02 Apr 2012 15:56
by lukescammell
Thanks for looking TQ.

To be perfectly honest, I still believe this is something that should be handled natively in XY anyway. It shouldn't be a separate program like many horrible windows programs do it (Acrobat, Java, I'm looking at you) but a simple option for monthly and weekly checks on non-beta versions would be great, as too would an option for daily when you're running a beta.

Hell, this could even be disabled by default as I know a lot of people are "funny" about programs phoning home.

Re: XYplorer Automatic Updater

Posted: 02 Apr 2012 16:26
by TheQwerty
lukescammell wrote:To be perfectly honest, I still believe this is something that should be handled natively in XY anyway. It shouldn't be a separate program like many horrible windows programs do it (Acrobat, Java, I'm looking at you) but a simple option for monthly and weekly checks on non-beta versions would be great, as too would an option for daily when you're running a beta.
It currently is possible to have XY check for non-beta versions, but it only happens on startup.

Config > Startup & Exit > Check for updates on startup

If I can find the time I'll document what I'm currently doing for beta updates, but I make no promises since I'm pretty swamped with other commitments. (In other words if anyone really wants to know pester me about it every now and again until I relent. :P)

Re: XYplorer Automatic Updater

Posted: 02 Apr 2012 16:29
by lukescammell
XY checks for non-beta already? Great!

Don - please can we have a tweak to allow beta checking on startup as well please? Pretty please? :)

Otherwise, yes, please let me see TQ ;)

Re: XYplorer Automatic Updater

Posted: 11 Aug 2012 00:30
by drewkeller
Using my notepad replacement and a regex to find and replace getkey occurrences with the new form.... Did not correct the problem. In passing I also noticed a bunch of setkey commands, which might also be an issue. I don't know any XY scripting, so I'm not sure what else mght be a problem. Here's the info for replacement in case anyone else comes along.

Using Notepad2-mod...

search string:
^(\s*)getkey\s(.*),\s*(.*),\s*(.*),\s*(.*);$

replace string:
\1\2 = getkey(\3, \4, \5);

That leaves a couple of oddball instances in the script which you can find with search string "getkey " (space after getkey).