Long ago I had an update.ahk (or updater.ahk, I don't remember) script in the ahk installation folder, running it would check ahk for updates and update if needed. Now there isn't such one (after one of the reinstalls I've lost that updater script), so how to properly update AHK now?
Was that update.ahk script an official one or not? If not - maybe it's still available somewhere and is working fine for you, guys?
How to update AHK properly?
How to update AHK properly?
question := (2b) || !(2b) © Shakespeare.
Re: How to update AHK properly?
No reply, so who was the author of update(r).ahk? I haven't this script...
Maybe you can make a new update script yourself ?
Inside the download page, you can check the version at http://ahkscript.org/download/1.1/version.txt (to use UrlDownloadToFile) and compare it to your installed AHK version, then download the good version, unzip xor install... it will depends of your if tests and logic...
To get your current version, for example some code at http://www.autohotkey.com/board/topic/5 ... ntry426577Or, perhaps, you can understand your old update.ahk script and you will have to just change the URL download link (new at http://ahkscript.org/download/1.1/), or to grab some function to make your own updater...
Or use the installer...
Good luck !
Edit:
Maybe you can make a new update script yourself ?
Inside the download page, you can check the version at http://ahkscript.org/download/1.1/version.txt (to use UrlDownloadToFile) and compare it to your installed AHK version, then download the good version, unzip xor install... it will depends of your if tests and logic...
To get your current version, for example some code at http://www.autohotkey.com/board/topic/5 ... ntry426577
Code: Select all
MsgBox % FileGetVersionInfo_AW(A_AhkPath,"FileVersion")
MsgBox % (FileGetVersionInfo_AW(A_AhkPath,"FileVersion")>="1.1.00.00")
FileGetVersionInfo_AW( peFile="", StringFileInfo="", Delimiter="|") { ; Written by SKAN
; http://www.autohotkey.com/forum/viewtopic.php?p=233188#233188 CD:24-Nov-2008 / LM:27-Oct-2010
Static CS, HexVal, Sps=" ", DLL="Version\", StrGet="StrGet"
If ( CS = "" )
CS := A_IsUnicode ? "W" : "A", HexVal := "msvcrt\s" (A_IsUnicode ? "w": "" ) "printf"
If ! FSz := DllCall( DLL "GetFileVersionInfoSize" CS , Str,peFile, UInt,0 )
Return "", DllCall( "SetLastError", UInt,1 )
VarSetCapacity( FVI, FSz, 0 ), VarSetCapacity( Trans,8 * ( A_IsUnicode ? 2 : 1 ) )
DllCall( DLL "GetFileVersionInfo" CS, Str,peFile, Int,0, UInt,FSz, UInt,&FVI )
If ! DllCall( DLL "VerQueryValue" CS
, UInt,&FVI, Str,"\VarFileInfo\Translation", UIntP,Translation, UInt,0 )
Return "", DllCall( "SetLastError", UInt,2 )
If ! DllCall( HexVal, Str,Trans, Str,"%08X", UInt,NumGet(Translation+0) )
Return "", DllCall( "SetLastError", UInt,3 )
Loop, Parse, StringFileInfo, %Delimiter%
{ subBlock := "\StringFileInfo\" SubStr(Trans,-3) SubStr(Trans,1,4) "\" A_LoopField
If ! DllCall( DLL "VerQueryValue" CS, UInt,&FVI, Str,SubBlock, UIntP,InfoPtr, UInt,0 )
Continue
Value := ( A_IsUnicode ? %StrGet%( InfoPtr, DllCall( "lstrlen" CS, UInt,InfoPtr ) )
: DllCall( "MulDiv", UInt,InfoPtr, Int,1, Int,1, "Str" ) )
Info .= Value ? ( (InStr(StringFileInfo,Delimiter) ? SubStr( A_LoopField Sps,1,24 ) . A_Tab : "") . Value . Delimiter ) :
} StringTrimRight, Info, Info, 1
Return Info
}
Or use the installer...
Good luck !
Edit:
Code: Select all
FileGetVersion, version, %A_ProgramFiles%\AutoHotkey\AutoHotkey.exe
msgbox % version
Re: How to update AHK properly?
I've found that script: http://l.autohotkey.net/Update.ahk
Since UpdateURL var's value there is http://ahkscript.org/download - I think the author is lexiko.
Since UpdateURL var's value there is http://ahkscript.org/download - I think the author is lexiko.
question := (2b) || !(2b) © Shakespeare.
Re: How to update AHK properly?
Hi kidbit,
Just run Installer.ahk. -- C:\Program Files\AutoHotkey\Installer.ahk
Its been in AHK for quite a while. Shows what ver. you have and checks for updates then lets you update
and/or modify to 32/64 bit, ansi/uni AHK. Or you can uninstall AHK.
hunter99
Just run Installer.ahk. -- C:\Program Files\AutoHotkey\Installer.ahk
Its been in AHK for quite a while. Shows what ver. you have and checks for updates then lets you update
and/or modify to 32/64 bit, ansi/uni AHK. Or you can uninstall AHK.
hunter99
Re: How to update AHK properly?
I checked installer.ahk, but I have this error "An error occured while checking for updates."
Currently I haven't found why, however you can have version and other website info in your registry, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AutoHotkey
Edit: about my error on version 1.1.14.02 at line 277 replace URLDownloadToFile http://l.autohotkey.net/version.txt, %A_Temp%\ahk_version.txt by URLDownloadToFile http://ahkscript.org/download/1.1/version.txt, %A_Temp%\ahk_version.txt, but nevermind it is fixed in v1.1.14.03, you need the last version !
Currently I haven't found why, however you can have version and other website info in your registry, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\AutoHotkey
Edit: about my error on version 1.1.14.02 at line 277 replace URLDownloadToFile http://l.autohotkey.net/version.txt, %A_Temp%\ahk_version.txt by URLDownloadToFile http://ahkscript.org/download/1.1/version.txt, %A_Temp%\ahk_version.txt, but nevermind it is fixed in v1.1.14.03, you need the last version !
Re: How to update AHK properly?
hunter99, it suggest to manually download and save and then run the installer.
Updater.ahk just asks for your confirmation and then updates everything on it's own (the only problem is that it sucks at reloading some of the running scripts).
Updater.ahk just asks for your confirmation and then updates everything on it's own (the only problem is that it sucks at reloading some of the running scripts).
question := (2b) || !(2b) © Shakespeare.
Re: How to update AHK properly?
kidbit, what ver of ahk are you using?
In AutoHotkey Setup window shows ver 1.1.14.02 installed,and asks What do you want to do?
The 1st box checked for updates, then showed Download ver 1.1.14.03
I clicked it , file downloaded, and clicked run when asked.
The 3 boxes in the AutoHotkey Setup window are:
1st it checks for latest ver. If there is a newer one it shows it. If you want it, click it and it downloads it and installs.
( thats the same as your orig. post but gives you the choice if to install )
2nd Lets you pick which ahk you want 32 or 64 bit, etc.
3rd Is to uninstall
hunter99
Just spoted this, see posts by jNizM here:
http://ahkscript.org/boards/viewtopic.php?f=6&t=2218
Notice how the 1st box changes. Not a new ver. available.
In AutoHotkey Setup window shows ver 1.1.14.02 installed,and asks What do you want to do?
The 1st box checked for updates, then showed Download ver 1.1.14.03
I clicked it , file downloaded, and clicked run when asked.
The 3 boxes in the AutoHotkey Setup window are:
1st it checks for latest ver. If there is a newer one it shows it. If you want it, click it and it downloads it and installs.
( thats the same as your orig. post but gives you the choice if to install )
2nd Lets you pick which ahk you want 32 or 64 bit, etc.
3rd Is to uninstall
hunter99
Just spoted this, see posts by jNizM here:
http://ahkscript.org/boards/viewtopic.php?f=6&t=2218
Notice how the 1st box changes. Not a new ver. available.
Re: How to update AHK properly?
hunter99
it's not related to the version number of my local install. And yes, everything is just the way you described:
That's why I'm happy I've finally found update.ahk which I was missing since it was lost.
it's not related to the version number of my local install. And yes, everything is just the way you described:
Update.ahk doesn't require the user to manually select where to download the files and doesn't require to run the downloaded installer. It does all of it by itself.hunter99 wrote:I clicked it , file downloaded, and clicked run when asked.
That's why I'm happy I've finally found update.ahk which I was missing since it was lost.
question := (2b) || !(2b) © Shakespeare.
-
- Posts: 7
- Joined: 30 Apr 2016, 10:29
Re: How to update AHK properly?
Or maybe the AHK devs could just do their job and add an auto-updater, instead of forcing users to rely on tedious/unreliable/clunky workarounds like this. It's pretty inexcusable that a program as popular and powerful as AHK still doesn't have one in 2017, especially since it's been in active development for nearly 15 years now. This isn't an advanced or specialty feature, it's bare-minimum requirement nowadays. Basic shortcomings like this are plentiful in AHK and have really been making me consider switching to AutoIt.Zelio wrote: [...]
Maybe you can make a new update script yourself ?
[...]
Re: How to update AHK properly?
Could be ... Zelio already mentionned one of Install.ahk changes abovekidbit wrote:it's not related to the version number of my local install.
Seriously ...kidbit wrote:Update.ahk doesn't require the user to manually select where to download the files and doesn't require to run the downloaded installer.
Re: How to update AHK properly?
sevenwenty wrote: Or maybe the AHK devs could just do their job and add an auto-updater, instead of forcing users to rely on tedious/unreliable/clunky workarounds like this. It's pretty inexcusable that a program as popular and powerful as AHK still doesn't have one in 2017, especially since it's been in active development for nearly 15 years now. This isn't an advanced or specialty feature, it's bare-minimum requirement nowadays. Basic shortcomings like this are plentiful in AHK and have really been making me consider switching to AutoIt.
The devs are those few people that spend their free time on the project, so it's not a (paid) job. And I much more prefer (not demand) they do that on features not easily scriptable.
Your opinion that an auto-updater in a bare-minimum requirement is one many likely don't share, quite the opposite.
• Should it check and update automatically? Perhaps I'm fine with the current version and I don't want an update (or even check).
• Should it ask to update? I use AHK to automate things, I don't want to be forced to manually dismiss a dialog (Sysinternals command line applications with a surprise EULA dialog come to mind).
• Should it do so based on a command line option? Well, if it requires a manual step, you might as well script it.
Re: How to update AHK properly?
Auto updates sound like a terrible thing for AHK. If you have a functional script, an update can be broken by it. At the very least, your current activities have to be interrupted, yeah? If someone has a script that is doing any sort of logging, having an AHK update and install prevent that from happening sounds very inconvenient.
But maybe I'm biased. I don't even update my web browser or windows itself because they ruin my workflow and break my software/how I use it.
But maybe I'm biased. I don't even update my web browser or windows itself because they ruin my workflow and break my software/how I use it.
Re: How to update AHK properly?
How ingrateful. With an attitude like that about people who are freely donating their time to create and maintain a language you use for free, especially when almost no one shares your opinion that it should auto-update, I'm sure no one will miss you. Please make the switch.sevenwenty wrote:Or maybe the AHK devs could just do their job and add an auto-updater, instead of forcing users to rely on tedious/unreliable/clunky workarounds like this. It's pretty inexcusable that a program as popular and powerful as AHK still doesn't have one in 2017, especially since it's been in active development for nearly 15 years now. This isn't an advanced or specialty feature, it's bare-minimum requirement nowadays. Basic shortcomings like this are plentiful in AHK and have really been making me consider switching to AutoIt.
If the other "basic shortcomings" in your mind are like this one which is absolutely terrible for a programming language to implement, then we can feel pretty confident that AHK has everything it needs.
-
- Posts: 7
- Joined: 30 Apr 2016, 10:29
Re: How to update AHK properly?
Someone provides perfectly valid criticism about serious flaws in AHK and you immediately attack them instead of actually discussing the topic. Brilliant! If the normal community response is basically "STFU!" when someone says "hey guys, this is really broken", then no wonder there are so many issues with AHK.boiler wrote:How ingrateful. With an attitude like that about people who are freely donating their time to create and maintain a language you use for free, especially when almost no one shares your opinion that it should auto-update, I'm sure no one will miss you. Please make the switch.sevenwenty wrote:Or maybe the AHK devs could just do their job and add an auto-updater, instead of forcing users to rely on tedious/unreliable/clunky workarounds like this. It's pretty inexcusable that a program as popular and powerful as AHK still doesn't have one in 2017, especially since it's been in active development for nearly 15 years now. This isn't an advanced or specialty feature, it's bare-minimum requirement nowadays. Basic shortcomings like this are plentiful in AHK and have really been making me consider switching to AutoIt.
If the other "basic shortcomings" in your mind are like this one which is absolutely terrible for a programming language to implement, then we can feel pretty confident that AHK has everything it needs.
Before the fanboys in this thread get even crazier, I guess I'll have to break down what I assumed would be common sense: I called for auto-updating, not forced updating. If you weren't so blinded by your fanboyism, you would have realized that such a feature would be optional. So your arguments against it make absolutely no sense and suggest a lack of basic reading comprehension.
Blind fanboyism like this is how projects never progress. Even worse is that it shows you don't really care about AHK at all, since you would rather mindlessly defend its obvious flaws instead of acknowledging that they exist.
Re: How to update AHK properly?
Are you so unaware that you don't know saying "maybe the AHK devs could just do their job" about people who are doing this for free is a real douchey move? Who would want to listen to anyone that clueless? Calling you out on it is not being a fanboy, it's being a human. Try to act like one.
Re: How to update AHK properly?
Not really a flaw and surely not serious.sevenwenty wrote:Someone provides perfectly valid criticism about serious flaws in AHK and you immediately attack them instead of actually discussing the topic.
As for the attacks, you started it !
Maybe politely bring some constructive comments if you want the project to evolve instead of just randomly bashing at what you don't like, like in all your 4 posts.
Re: How to update AHK properly?
As far as I can tell, AutoIt doesn't have an auto-updater. It has an update utility, which is no easier to use than the update function built into AutoHotkey's installer, or the other update script.
If it doesn't work the way you want, write a script. That's more or less what AutoHotkey's for.
If it doesn't work the way you want, write a script. That's more or less what AutoHotkey's for.
Re: How to update AHK properly?
You're using strong language in your posts, so you can expect strong language in return. Contrary to your other replies, here you do give an example of what you think is lacking or broken, but multiple users provide perfectly valid counterarguments on why anything AHK does independently can interfere with its core functionality.sevenwenty wrote:Someone provides perfectly valid criticism about serious flaws in AHK and you immediately attack them instead of actually discussing the topic. Brilliant! If the normal community response is basically "STFU!" when someone says "hey guys, this is really broken", then no wonder there are so many issues with AHK.
Like I said in reply to one of your other posts, all your posts criticize AHK. Before disagreeing with you I explicitly told you I'm fine with that in order to avoid you calling anybody a fanboy.. too bad that proved ineffective. Although before accusing others of lacking in comprehension you should make sure you're not the one ignoring posts and selectively replying.Before the fanboys in this thread get even crazier, I guess I'll have to break down what I assumed would be common sense: I called for auto-updating, not forced updating. If you weren't so blinded by your fanboyism, you would have realized that such a feature would be optional. So your arguments against it make absolutely no sense and suggest a lack of basic reading comprehension.
I doubt you can convince anybody to agree with you on this, but in the future (in whichever situation) you should carefully nuance your reply and accept disagreement without resorting to personal attacks in order to not be seen as a mere troll. That's just food for thought and totally up to you.
Who is online
Users browsing this forum: Google [Bot] and 283 guests