Any way its possible with gDrive?
I found this out and use it to update AHK itself:
Code: Select all
Source=http://ahkscript.org/download/1.1/version.txt
DownloadLinkA=http://ahkscript.org/download/
DownloadLinkB=http://ahkscript.org/download/ahk-install.exe
hObject:=ComObjCreate("WinHttp.WinHttpRequest.5.1") ;-Create the Object
ComObjError(false)
hObject.Open("GET",Source) ;-Open communication
hObject.Send() ;-Send the "get" request
Available_Version:=hObject.ResponseText ;-Set the "b" variable to the response
if (Available_Version>Installed_Version)
msgbox, 4100,,New version available.`nOpen AHK download page?
IfMsgBox, Yes
{
Run, DownloadLinkA
Run, DownloadLinkB
}
It shold download anything within the new version folder and replace itself and than reload itself.
Is that possible?
I uploaded a .txt file with 1.0.0.0 parameter for testing.
Heres the link i want to make it work with.
https://drive.google.com/file/d/1UEgD4F ... Lt9oM/view
I simply rewrote it to
Code: Select all
Source=https://drive.google.com/file/d/1UEgD4FOZnz7croXTNprAuGbzL4ZLt9oM/view
hObject:=ComObjCreate("WinHttp.WinHttpRequest.5.1") ;-Create the Object
ComObjError(false)
hObject.Open("GET",Source) ;-Open communication
hObject.Send() ;-Send the "get" request
Available_Version:=hObject.ResponseText ;-Set the "b" variable to the response
msgbox, %Available_Version%