Why was AHK installer renamed?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
mviens
Posts: 43
Joined: 08 Jan 2014, 19:04

Why was AHK installer renamed?

13 Oct 2016, 09:52

I have a script that checks for a new version of AHK (found here: http://ahkscript.org/download/1.1/version.txt).

if found, it downloads and automatically installs it. This morning, it started failing. After looking at it, I noticed that the downloaded file was not correct. For previous versions of AHK, they where accessible as:

Code: Select all

https://autohotkey.com/download/1.1/AutoHotkey112401_Install.exe
But as of today, it seems the new file is accessible via:

Code: Select all

https://autohotkey.com/download/1.1/AutoHotkey_1.1.24.02_setup.exe
Was there a reason for switching the filename? It breaks things that expect a consistent pattern.
Mike V.
User avatar
tank
Posts: 3130
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

Re: Why was AHK installer renamed?

13 Oct 2016, 13:43

We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
garry
Posts: 3788
Joined: 22 Dec 2013, 12:50

Re: Why was AHK installer renamed?

13 Oct 2016, 15:34

EDIT : the problem was with XP , works with WIN-10

thank you tank

I once used urldownloadtovar , but have no success with this
https://autohotkey.com/download/1.1/version.txt

or other question
I see the text in ActiveX , can I copy this text to a variable ?

Code: Select all

;xxa=Shell.Explorer                  ;- IExplorer
xxa=Mozilla.Browser                  ;- firefox
F1:="https://autohotkey.com/download/1.1/version.txt"
;F2:="https://autohotkey.com/download/ahk-install.exe"
Gui Add, ActiveX, x1 y2 w200 h50 vWB,%xxa%
WB.Navigate(F1)
Gui, Show, h100
return
GuiClose:
ExitApp
Example UrlDownloadToVar

Code: Select all

;f1:="http://50.7.70.58:8708/played.html"
F1:="https://autohotkey.com/download/1.1/version.txt"  ;- a security error occured ( with XP ) WIN-10 OK
;f1:="http://www.wrongadress.htm"                      ;- not exist

xx:=ComObjCreate("WinHttp.WinHttpRequest.5.1")  ;-Create the Object

;-- catch get error / don't show failure
;ComObjError(false)
;xx.Silent := True                              ;- script failure = off

xx.SetTimeouts(500,500,500,500)
try {
    xx.Open("GET",f1)                           ;-Open communication
    xx.Send()                                   ;-Send the "get" request
    aac=
    aac:=xx.ResponseText                        ;-Set the "aac" variable to the response
    msgbox, 262208,%f1%--TEXT ,%aac%
} catch e {
    xxx:=e.Message
    msgbox, 262208,ERROR ,Error=Catch`n%f1%`n------------------------------------------`n%xxx%`n------------------------------------------,
    }
return
example works with XP , AHK-version compare

Code: Select all

setworkingdir,%a_scriptdir%
A =%A_AHKVERSION%

f1x:="https://autohotkey.com/download/1.1/version.txt"

;urldownloadtofile,%f1x%,version.txt                                  ; no success with XP
;return

SplitPath,f1x, name, dir, ext, name_no_ext, drive
ref=%dir%
f2=%a_scriptdir%\%name%

WGET1=%A_SCRIPTDIR%\wget.exe
ifnotexist,%wget1%
  {
  if A_Is64bitOS
    x1=https://eternallybored.org/misc/wget/current/wget64.exe
  else
    x1=https://eternallybored.org/misc/wget/current/wget.exe
  urldownloadtofile,%x1%,wget.exe
  }
ifexist,%f2%
   filedelete,%f2%
runwait,%comspec% /c wget --no-parent --referer=%ref% "%f1x%",,hide
fileread,B,%f2%
   if (A<>B)
     {
     msgbox, 262436,AHK-Version ,(Changed)`nYour existing version is=%A%`n          Actual version is=%B%`n64-bit=%a_is64bitos%`nUnicode=%a_isunicode%`nOS=%a_osversion%`nWant you open Autohotkey downloads page ?
     IfMsgBox,No
       return
     Else
       {
       run,https://autohotkey.com/download/
       ;run,https://autohotkey.com/download/ahk-install.exe
       return
       }
     }
   else
     {
     msgbox, 262436,AHK-Version ,(Equal)`nYour existing version is=%A%`n           Actual version is=%B%`n64-bit=%a_is64bitos%`nUnicode=%a_isunicode%`nOS=%a_osversion%`nWant you open Autohotkey downloads page ?
     IfMsgBox,No
       return
     Else
       run,https://autohotkey.com/download/
    return
    }
return
Last edited by garry on 16 Oct 2016, 15:27, edited 1 time in total.
User avatar
mviens
Posts: 43
Joined: 08 Jan 2014, 19:04

Re: Why was AHK installer renamed?

13 Oct 2016, 16:26

Thanks Tank, I will adjust the link to use the "static" one. :)
Mike V.
guest3456
Posts: 3463
Joined: 09 Oct 2013, 10:31

Re: Why was AHK installer renamed?

13 Oct 2016, 20:45

probably just random

garry
Posts: 3788
Joined: 22 Dec 2013, 12:50

Re: Why was AHK installer renamed?

16 Oct 2016, 15:30

I once used urldownloadtovar , but have no success with this
https://autohotkey.com/download/1.1/version.txt
this problem was with XP, works fine with WIN-10

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 124 guests