Wisniske Posted September 3, 2006 Posted September 3, 2006 I am looking for a way to make my Bot check for an update from the web before running. If the version number (or whatever) does not match it will update the .exe file automatically, then restart the Bot. Any help would be great, Thanks in advance..
Xenobiologist Posted September 3, 2006 Posted September 3, 2006 Hi what bot what script what site to look to verify? So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
Chobyhy Posted September 3, 2006 Posted September 3, 2006 i think he meant his own program. I'm trying to make this too but i dont know how. I think he meant like before opening up the program, it will do a version check with the latest version. if version code does not match it will download the update from the designated location, if it matches it will just run the program
Wisniske Posted September 3, 2006 Author Posted September 3, 2006 It's a bot to vote on line (long story, sad really ), will be going to my website to update, I am just looking for a generic way to do it. The entire bot is made in AutoIt, I do have an installer, so even if I had to add a small program or another .au3 file that would be fine...
Wisniske Posted September 3, 2006 Author Posted September 3, 2006 i think he meant his own program. I'm trying to make this too but i dont know how. I think he meant like before opening up the program, it will do a version check with the latest version. if version code does not match it will download the update from the designated location, if it matches it will just run the programYes, exactly.....
Moderators SmOke_N Posted September 3, 2006 Moderators Posted September 3, 2006 FileWrite() / Or IniWrite() -- InetGet() / FileWrite/FileRead or IniRead -- Func to Read Ini(s) or File(s) / Compare the 2, if InetGet() File is greater then prompt for download. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
lopolop Posted September 3, 2006 Posted September 3, 2006 what about almost like a RSS Feed works isnt there something that u can do say if you had a webpage..(someone made something to read xml)
Moderators SmOke_N Posted September 3, 2006 Moderators Posted September 3, 2006 what about almost like a RSS Feed works isnt there something that u can do say if you had a webpage..(someone made something to read xml)I've made something like that... But it involves the steps I mentioned above. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Wisniske Posted September 3, 2006 Author Posted September 3, 2006 (edited) ; I would like to thank SmOKe N, and Gene from this forum for the information;What I have done is downloaded the version.ini file, and checked it with the version number. ;If the version number is less than the current version it will get the size of the update file;and download the update file to the correct folder while verifying size.;If the size does not match it will error out and time out in 10 seconds;Check out Gene's take on this subject; http://www.autoitscript.com/forum/index.ph...mp;#entry174804InetGet("http://www.website.com/downloads/version.ini", "version.ini")$chk = IniRead("version.ini", "version", "ver", "NotFound")If $chk > 1.2 Then $size = InetGetSize("http://www.website.com/downloads/BOT.exe") InetGet("http://www.website.com/downloads/BOT.exe", "c:\Program Files\BOT\BOT.exe", 1, 1) While @InetGetActive TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 5, 16) Sleep(250) WEnd If @InetGetBytesRead <> $size Then MsgBox(16, "BOT Update", "Error occurred During Update", 10) Else EndIf ;BOT code here Edited September 3, 2006 by Wisniske
Moderators SmOke_N Posted September 3, 2006 Moderators Posted September 3, 2006 Just FYI ... You may want to do...If Number($chk) > Number($CurrentVersion) Then Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
PartyPooper Posted September 4, 2006 Posted September 4, 2006 I wrote a UDF for something similar. You may want to check out INetUpdaterIt may do what you want or provide you with a basis to work from for your own updater.
Wisniske Posted September 9, 2006 Author Posted September 9, 2006 I wrote a UDF for something similar. You may want to check out INetUpdaterIt may do what you want or provide you with a basis to work from for your own updater.Thanks, I'll check it out.... a progress bar would be outstanding....
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now