 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
aik Guest
|
Posted: Fri Sep 02, 2005 1:56 pm Post subject: Checking for updates |
|
|
Having problems with a msgbox that is supposed to come up when theres a new update available.
| Code: | IfExist, version.txt
FileDelete, version.txt
URLDownloadToFile, http://www.aikscroll.reality-shock.com/version.txt, version.txt
thisversion = 6.2
FileRead, mostrecentversion, version.txt
If mostrecentversion not in %version%
Msgbox, 1, Update Available, A new version is available. Press 'OK' to download it. Otherwise, cancel.
IfMsgbox, OK
{
FileSelectFolder, zip ,, 3, Save the .zip file to...? You should unzip this right over your existing AiK Macros folder.
URLDownloadToFile, http://aikscroll.reality-shock.com/aikmacros.zip, %zip%\aikmacros.zip
return
}
return
|
I get the msgbox now matter what the file reads. What could be wriong? |
|
| Back to top |
|
 |
Litmus Red
Joined: 25 Jul 2005 Posts: 139 Location: Richmond, Virginia
|
Posted: Fri Sep 02, 2005 5:15 pm Post subject: |
|
|
The following line doesn't look right to me.
| Code: | | If mostrecentversion not in %version% |
I think it should be something like ...
| Code: | | If thisversion not in %mostrecentversion% |
|
|
| Back to top |
|
 |
Guest
|
Posted: Fri Sep 02, 2005 5:56 pm Post subject: |
|
|
hmmm... I'll see if that works when I get home. I also tried:
| Code: |
If mostrecentversion = NOT %version%
|
P.S. looking back I realize I also used the wrong var (version instead of thisversion ) |
|
| Back to top |
|
 |
Guest
|
Posted: Fri Sep 02, 2005 6:00 pm Post subject: |
|
|
| forgot to meantion ^--- that didnt work. wouldve edit my post but im not logged in |
|
| Back to top |
|
 |
ranomore
Joined: 06 Nov 2004 Posts: 178 Location: Salt Lake City, UT
|
Posted: Fri Sep 02, 2005 7:45 pm Post subject: |
|
|
It seems easier to me to just read line 1 of the file (that way you don't have to deal with any accidental linefeeds):
| Code: | FileDelete, version.txt
URLDownloadToFile, http://www.aikscroll.reality-shock.com/version.txt, version.txt
thisversion = 6.2
FileReadLine, mostrecentversion, version.txt, 1
If mostrecentversion > %thisversion%
{
Msgbox, 1, Update Available, A new version is available. Press 'OK' to download it. Otherwise, cancel.
IfMsgbox, OK
{
FileSelectFolder, zip ,, 3, Save the .zip file to...? You should unzip this right over your existing AiK Macros folder.
URLDownloadToFile, http://aikscroll.reality-shock.com/aikmacros.zip, %zip%\aikmacros.zip
}
}
return |
|
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|