Autohotkey script to update automatically your XYplorer beta

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
noutters
Posts: 40
Joined: 17 Jan 2006 15:39
Location: Sweden

Autohotkey script to update automatically your XYplorer beta

Post by noutters »

This Autohotkey script (http://www.autohotkey.com/) will download the lastest beta och XYplorer and upgrade it on your machine.

Enjoy! :)

;-------------------Start of script-------------------------
#SingleInstance,Force
#Persistent
ApplicationTitle=Download XYplorer Beta`nCompile 5/1/2007 11:38AM
SetBatchLines,-1

TrayTip,,Downloading latest XYplorer Beta...
UrlDownloadToFile, http://www.xyplorer.com/latestbeta.php, c:\temp.zip
TrayTip,,Downloading latest XYplorer Beta... DONE!
MsgBox,1,,Close all instances of XYplorer and upgrade?
IfMsgBox,Cancel
{
FileDelete, c:\temp.zip
ExitApp
}

TrayTip,,Closing XYplorer
loop, 10
{
Process,Close,XYplorer.exe
if ErrorLevel
Sleep, 500
else
Continue
}

; The following line should be changed according to the program you use to unzip your files
TrayTip,,Upgrading XYplorer
RunWait, F:\_Utilities\7za.exe e -y -o"C:\Program Files\XYplorer\" c:\temp.zip

FileDelete, c:\temp.zip
TrayTip,,Restarting XYplorer
Run, C:\Program Files\XYplorer\XYplorer.exe
Sleep 1000
TrayTip
ExitApp

Return
;-------------------End of script-------------------------
Last edited by noutters on 01 May 2007 11:37, edited 9 times in total.

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

Post by lukescammell »

Groovy.

Can you add in UPXing it as well, then I'll be very impressed :)

I use the following command to UPX XY:

Code: Select all

upx *.* --brute --nrv2d
Thanks :)

Edit: Thinking ahead, perhaps Don could default to naming the latest beta something like "xyplorer.latest.zip" and "xyplorer.latest.exe"? This way you won't ever have to update that line :)
Used to update to the latest beta every day. Now I have children instead…
Windows 10 Pro x64 (everywhere except phone…)

noutters
Posts: 40
Joined: 17 Jan 2006 15:39
Location: Sweden

Added UPX compression in the script

Post by noutters »

Uncomment the line and change the path of UPX if you want to compress the files in the XYplorer directory. This is untested so may be you have to tune it a bit and get the right arguments in place.

admin
Site Admin
Posts: 65185
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Autohotkey script to update automatically your XYplorer

Post by admin »

noutters wrote:This Autohotkey script (http://www.autohotkey.com/) will download the lastest beta och XYplorer and upgrade it on your machine.

Enjoy! :)
Hey, thanks, very nice!! :D

admin
Site Admin
Posts: 65185
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

lukescammell wrote:Edit: Thinking ahead, perhaps Don could default to naming the latest beta something like "xyplorer.latest.zip" and "xyplorer.latest.exe"? This way you won't ever have to update that line :)
In the past I once had a version number in it (TrackerV3_4.00_Install.zip), then took it away (trackerv3_install.zip), then put it back in (XYplorer_4.40_BETA.zip), then made it lower case (xyplorer_5.10_beta.zip) -- and I forgot the reasoning behind those changes and did not make any note about it (had more important things to do...).
There was some discussion about it here, but... damn, is there anybody who knows how you search this forum and find something??? :evil: :wink:

jacky
XYwiki Master
Posts: 3106
Joined: 23 Aug 2005 22:25
Location: France
Contact:

Post by jacky »

admin wrote:There was some discussion about it here, but... damn, is there anybody who knows how you search this forum and find something??? :evil: :wink:
Here's what I found:

This is when you removed the version number:
http://www.xyplorer.com/xyfc/viewtopic.php?p=1918#1918
Which had explanations on why, and triggered some reactions.

Then, when XY came up, the version number was back.
http://www.xyplorer.com/xyfc/viewtopic.php?p=3694#3694
I don't know it there was a discussion behind this or not, though.

And IMO it's best as it is, with the version number in the filename... I understand the "problem" for automatic procedure, but I think it's best to sort things out, and it's not like XY changes version number (on that level) every day :roll:
Proud XYplorer Fanatic

admin
Site Admin
Posts: 65185
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Post by admin »

jacky wrote:
admin wrote:There was some discussion about it here, but... damn, is there anybody who knows how you search this forum and find something??? :evil: :wink:
Here's what I found:

This is when you removed the version number:
http://www.xyplorer.com/xyfc/viewtopic.php?p=1918#1918
Which had explanations on why, and triggered some reactions.

Then, when XY came up, the version number was back.
http://www.xyplorer.com/xyfc/viewtopic.php?p=3694#3694
I don't know it there was a discussion behind this or not, though.

And IMO it's best as it is, with the version number in the filename... I understand the "problem" for automatic procedure, but I think it's best to sort things out, and it's not like XY changes version number (on that level) every day :roll:
Thanks for looking it up. :)

And yes, I share your opinion.

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

Post by avsfan »

This looks very nice!

I have a follow-up question on the script, though -- I usually have 2 instances of XY running with different configuration files. The above script will only kill one of them. If I modify the script to repeat the two lines as follows:

IfWinExist, XYplorer
WinKill
IfWinExist, XYplorer
WinKill

the second window still persists and I have to kill it manually.

Is there a way to have it kill *all* XY processes? (or is there another solution?)

Thanks!

andy

surrender
Posts: 623
Joined: 23 Oct 2005 08:53
Location: Berlin, Germany

Post by surrender »

@ andy,
Just curious. Do you run 2 XYs to mimic dual pane or do you have some other reasons?
and more curious, what is that 2 XYs can do that 1 XY can't?

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

Post by avsfan »

A fair question. It's basically just a way to have more tabs open without having them super-crowded. I use one for the various directories that I use in my development environment, and one for the assorted other stuff that I do regularly. I could just pick the folders off the tree, but they're not always where I want them, so I prefer to have a tab for each frequently used folder.

(and I occasionally use the two XYs almost like a dual pane -- dragging from one into another -- but not frequently).

Now, I could probably get by with a single XY if it had the "Per-Tab history" that's been discussed before... (after CKS, of course -- but I'd REALLY REALLY love to have each tab have its own history! PLEASE! :) )

noutters
Posts: 40
Joined: 17 Jan 2006 15:39
Location: Sweden

Post by noutters »

Is there a way to have it kill *all* XY processes? (or is there another solution?)
You could do a loop from 1 to 100 that includes the kill commands.
I guess you do not run more than 100 instances of XYplorer :wink:

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

Post by avsfan »

You could do a loop from 1 to 100 that includes the kill commands.
Is that different from the four lines I posted earlier that calls the kill command twice? that method didn't work, and I'm wondering if there's something else that needs to be done to get it to kill both of them...

Any ideas?

andy

noutters
Posts: 40
Joined: 17 Jan 2006 15:39
Location: Sweden

Post by noutters »

Ok, I updated the script so it kills now up to 10 instances of XYplorer.

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

Post by avsfan »

Ah, very nice!

The only problem I see now is that it kills *anything* that starts with XYPlorer, including my AutoHotKey script that I had called "XYPlorerUpdate" and my Firefox window with the active tab using this forum! Not exactly what I was expecting, but at least it was thorough! :)

I renamed the script, so that's not a problem. Is there a way to get it to leave Firefox alone? (or even better yet, just to have it only kill XYPlorer.exe processes?)

Thanks again! I'll have to learn more about AutoHotKey (I'd never heard of it before you posted about it!)

andy

noutters
Posts: 40
Joined: 17 Jan 2006 15:39
Location: Sweden

Post by noutters »

Instead of
IfWinNotExist, XYplorer
try
IfWinNotExist, XYplorer @ XYPlorer.ini
or whatever ini file you use. This command identifies XYplorer before killing it, so it is important you give the function the right window header text. Be specific and the other apps with XYplorer in the window title will survive :)

Post Reply