I was told about a really great idea - a tiny script to automatically check for new versions of AutoHotkey!
From http://s89775182.onlineho...s/forum/viewtopic.php?t=8 :
[copy or print]
;---2005-10-16 garry, check AutoHotKey for new version -------------
F1=%A_ScriptDir%\AHKURL.TXT
A=%A_AHKVERSION%
URLDownloadToFile,http://www.autohotkey.com,%F1%
I=0
Loop
{
    I+=1
    FileReadLine, line, %F1%, %i%
    if ErrorLevel <> 0
    exitApp
  IfInString,line,The latest version is
    {
  stringmid,BA,LINE,25,18
    GOTO A2
    }
}
A2:
FileDelete,%F1%
B1=%BA%
I=0
loop,parse,B1,`
{
  Transform,B2,ASC,%A_LOOPFIELD%
  I+=1
  if B2<46
  GOTO A3
  if B2>57
  GOTO A3
}
A3:
stringmid,B,B1,1,I-1
if A<>%B%
{
msgbox,(Changed) Your existing version is=%A%, Actual version is=%B%
run,http://www.autohotkey.com/download
ExitApp
}
else
{
msgbox,(Equal) Your existing version is=%A%, Actual version is=%B%
MsgBox, 4, , Start AHK Forum?
IfMsgBox,No
return
Else
Run,http://www.autohotkey.com/forum
ExitApp
}
I'm sure someone in here could even optimize that? To maybe let it auto-check at a given interval, add some other stuff, ...?;---2005-10-16 garry, check AutoHotKey for new version -------------
F1=%A_ScriptDir%\AHKURL.TXT
A=%A_AHKVERSION%
URLDownloadToFile,http://www.autohotkey.com,%F1%
I=0
Loop
{
    I+=1
    FileReadLine, line, %F1%, %i%
    if ErrorLevel <> 0
    exitApp
  IfInString,line,The latest version is
    {
  stringmid,BA,LINE,25,18
    GOTO A2
    }
}
A2:
FileDelete,%F1%
B1=%BA%
I=0
loop,parse,B1,`
{
  Transform,B2,ASC,%A_LOOPFIELD%
  I+=1
  if B2<46
  GOTO A3
  if B2>57
  GOTO A3
}
A3:
stringmid,B,B1,1,I-1
if A<>%B%
{
msgbox,(Changed) Your existing version is=%A%, Actual version is=%B%
run,http://www.autohotkey.com/download
ExitApp
}
else
{
msgbox,(Equal) Your existing version is=%A%, Actual version is=%B%
MsgBox, 4, , Start AHK Forum?
IfMsgBox,No
return
Else
Run,http://www.autohotkey.com/forum
ExitApp
}






Logged














