XYplorer Automatic Updater

Discuss and share scripts and script files...
carmenm

Re: XYplorer Automatic Updater

Post by carmenm »

thanks a lot for the fix!

gtm
Posts: 87
Joined: 01 May 2011 11:03

Re: XYplorer Automatic Updater

Post 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 4365 times

mithrin
Posts: 15
Joined: 15 Jan 2012 01:56

Re: XYplorer Automatic Updater

Post 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.
Last edited by mithrin on 31 Mar 2012 18:52, edited 1 time in total.

avsfan
Posts: 554
Joined: 29 Jun 2006 09:00
Location: Fort Collins, Colorado

Re: XYplorer Automatic Updater

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

highend
Posts: 14639
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: XYplorer Automatic Updater

Post 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.
One of my scripts helped you out? Please donate via Paypal

j_c_hallgren
XY Blog Master
Posts: 5826
Joined: 02 Jan 2006 19:34
Location: So. Chatham MA/Clearwater FL
Contact:

Re: XYplorer Automatic Updater

Post 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.
Still spending WAY TOO much time here! But it's such a pleasure helping XY be a treasure!
(XP on laptop with touchpad and thus NO mouse!) Using latest beta vers when possible.

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: XYplorer Automatic Updater

Post 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
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

highend
Posts: 14639
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: XYplorer Automatic Updater

Post by highend »

The good thing about the "original" one (from this thread) is, that it displays the changelog and I really like that feature!
One of my scripts helped you out? Please donate via Paypal

lukescammell
Posts: 744
Joined: 28 Jul 2006 13:15
Location: Kent, UK
Contact:

Re: XYplorer Automatic Updater

Post 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.
Used to update to the latest beta every day. Now I have children instead…
Windows 10 Pro x64 (everywhere except phone…)

mithrin
Posts: 15
Joined: 15 Jan 2012 01:56

Re: XYplorer Automatic Updater

Post 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.

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: XYplorer Automatic Updater

Post 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.

lukescammell
Posts: 744
Joined: 28 Jul 2006 13:15
Location: Kent, UK
Contact:

Re: XYplorer Automatic Updater

Post 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.
Used to update to the latest beta every day. Now I have children instead…
Windows 10 Pro x64 (everywhere except phone…)

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: XYplorer Automatic Updater

Post 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)

lukescammell
Posts: 744
Joined: 28 Jul 2006 13:15
Location: Kent, UK
Contact:

Re: XYplorer Automatic Updater

Post 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 ;)
Used to update to the latest beta every day. Now I have children instead…
Windows 10 Pro x64 (everywhere except phone…)

drewkeller
Posts: 33
Joined: 01 Nov 2008 05:29

Re: XYplorer Automatic Updater

Post 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).

Post Reply