Chris_1013 Posted January 18, 2005 Share Posted January 18, 2005 (edited) Looks good, but I don't like the fact it says (Old) next to the latest Public Release Version of AutoIt, because it's not really old, it's the current release version.I'd actually be inclined not to have anything next to either of the two version numbers in the 'Latest AutoIt3 Versions' section, since it should be obvious that they're both current, and only use something descriptive on the installed version.I'm not sure if this is what Jon meant or conflicts with his suggestion, it's just my view.Edit: OK, now I'm running it, seeing *New* again a newer version in the Latest versions bit makes sense. Still don't like (Old) being there though... Edited January 18, 2005 by Chris_1013 Link to comment Share on other sites More sharing options...
ioliver Posted January 18, 2005 Share Posted January 18, 2005 @Saunders, I get the following error when I try to run your script:>"C:\Program Files\AutoIt3\autoit3.exe" /ErrorStdOut "C:\Scripts (that I've written)\CFCU\Downloaded Scripts\AutoUpdateIt by Saunders.au3" C:\Scripts (that I've written)\CFCU\Downloaded Scripts\AutoUpdateIt by Saunders.au3 (21) : ==> Unknown function name.: Global Const $s_Title = 'AutoIt3 Update Utility' Global ^ ERRORIs there something that I'm missing? I did add the CompareVersions.au3 Include.Thanks,Ian "Blessed be the name of the Lord" - Job 1:21Check out Search IMF Link to comment Share on other sites More sharing options...
Chris_1013 Posted January 18, 2005 Share Posted January 18, 2005 Looks like your version of AutoIt is too old. Constants are a quite newly added feature. Just download the newest version from http://www.autoitscript.com/autoit3/files/beta/autoit/ and install this, then this should work. Link to comment Share on other sites More sharing options...
sykes Posted January 18, 2005 Share Posted January 18, 2005 Nice work Rob!! We have enough youth. How about a fountain of SMART? Link to comment Share on other sites More sharing options...
Josbe Posted January 18, 2005 Share Posted January 18, 2005 Good job, Saunders.Some suggestions/ideas:- A option to set a default directory for target downloads (beta & release). (maybe in a separated window)- A option(Checkbox) that determine if the actual download will be executed directly when finished.(main dialog)- A option(Checkbox) to notify when the download has been finished. (If dialog is minimized, then show a TrayTip, else a MsgBox)I think that, the downloading process, could be displayed in the main dialog with some adaptation and to disable the 'Download' buttons until the file is downloaded. Also a possible 'Run' button would be enable when the download it's ready.Of course...it's your design. Good luck BTW: A little question...Why you don't add the "CompareVersions" directly in the source? AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Valik Posted January 18, 2005 Share Posted January 18, 2005 *Edit: How does this /silent install option work? I tried just running autoit-v3-setup.exe /silent but it acts like normal.<{POST_SNAPBACK}>You should really take my advice on this one. Do not worry about AutoIt's silent install mode. Automate the installer GUI. If you just blindly use silent mode or do a fresh install every time, you will piss somebody off when you overwrite their registry settings.However, if you insist, its /S I believe, case sensitive. If capital-S doesn't work, try lower case. Link to comment Share on other sites More sharing options...
Blue_Drache Posted January 18, 2005 Share Posted January 18, 2005 Case in point: I keep icons inside the Aut2Exe\Icons folder. When I updated from Jan 13's beta to Jan 17's beta, the installer wiped out my custom icons when it did the "you must uninstall" bit. I've recovered them the slow way and have placed them out of the way of the beta's happy delete function. Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache Link to comment Share on other sites More sharing options...
Chris_1013 Posted January 18, 2005 Share Posted January 18, 2005 What's really at fault here? I mean, should the installer not wipe out default settings when run with the silent option, or should it be up to the user to not run in silent mode if we want this?Apart from this though, you are right that scripting the GUI of the installer is a safer option if this is the case. And default to not uninstalling...? Or give the user the option. I'm trying to think of the best combination between giving the user the most flexibility and not over complicating the whole situation. Link to comment Share on other sites More sharing options...
therks Posted January 19, 2005 Share Posted January 19, 2005 (edited) I'd actually be inclined not to have anything next to either of the two version numbers in the 'Latest AutoIt3 Versions' section, since it should be obvious that they're both current, and only use something descriptive on the installed version.Well now I'm not sure what to do...I'm keeping the *New* tag next to the current versions. Perhaps I should just get rid of the Old and Current tags altogether? This is the way it was from the beginning.Some suggestions/ideas:- A option to set a default directory for target downloads (beta & release). (maybe in a separated window)- A option(Checkbox) that determine if the actual download will be executed directly when finished.(main dialog)- A option(Checkbox) to notify when the download has been finished. (If dialog is minimized, then show a TrayTip, else a MsgBox)1 - You mean like, instead of the Desktop? Perhaps I could just have it save the last directory used, and then have that as the default. Unless what you wanted was for there to be no FileSave dialog when downloading at all. Kinda like P2P applications.2 - Good idea. Just need to figure out where to place it.3 - I did have a MsgBox notification upon completion before, but felt someone would think it useless, so I took it out.I think that, the downloading process, could be displayed in the main dialog with some adaptation and to disable the 'Download' buttons until the file is downloaded. Also a possible 'Run' button would be enable when the download it's ready.Heh, I was afraid someone would suggest putting it all in one window. To be honest, there's two reasons I made the download window seperate. First, I thought it would be a nice part of an example script to have multiple windows, something extra to learn about. Second, it was easier, heh.BTW: A little question...Why you don't add the "CompareVersions" directly in the source?It just seemed like it was kinda long, but if it doesn't bother anybody I'll put it in the next version, easier than me having to link to the UDF's thread (although I was trying to get some comments on the thread, maybe I'm just the only person who finds the function useful?).You should really take my advice on this one. Do not worry about AutoIt's silent install mode. Automate the installer GUI. If you just blindly use silent mode or do a fresh install every time, you will piss somebody off when you overwrite their registry settings.Well I wouldn't consider it blindly, I was going to have a checkbox, or seperate button or something, with warnings, etc.ie:"[Quiet Install] File associations and compiler settings will be lost."I don't need to try and give people a reason to be pissed off with me. I do that enough without trying. Edited January 19, 2005 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
CyberSlug Posted January 19, 2005 Share Posted January 19, 2005 (edited) This is not bullet proof as I've only tested it once, but it seems to work. You better compile it first, or the installation will fail due to AutoIt3.exe being open expandcollapse popupRun("autoit-v3-1.0.103.exe") $title = "AutoIt v3.0.103 Setup" AdlibEnable("AdlibFunc") ; WIZARD WELCOME SCREEN WinWait($title) ControlClick($title,"", "&Next >") ; LICENSE AGREEMENT _WaitForText("License Agreement") ControlClick($title,"", "I &Agree") ; PREVIOUS VERSION FOUND.... (might not happen in all cases) ; Two radio buttons: ; 1201: "Uninstall before continuing (recommended)" ; 1201: "Overwrite current version (leaves file associations and compiler settings intact)" If ControlGetText($title,"", 1037) = "Previous Installation Found" Then ControlClick($title,"", "Uninstall before continuing (recommended)") ControlClick($title,"", "&Next >") EndIf ; CHOOSE DESTINATION ; Edit1 control #1019 contains the path _WaitForText("Choose Install Location") ;;;;ControlSetText($title,"",1019, @ProgramFilesDir & "\AutoIt3") ControlClick($title,"", "&Install") ; wait for completion message While ControlGetText($title,"","Button2") <> "&Finish" sleep(10) WEnd ControlClick($title,"","&Finish" EXIT Func _WaitForText($text) ;1037 is the magic control reference number for the subtitle of each window in the installation.... While ControlGetText($title,"",1037) <> $text sleep(10) WEnd EndFunc Func AdlibFunc() ;should watch for the following type of error ; which is due to AutoIt or the help file or the Spy/Info tool being open: ; Title: AutoIt v3.0.103 Setup ; Class: #32770 ; Three buttons: &Abort &Retry &Ignore #cs -- THE TEXT -- Error opening file for writing: C:\Program Files\AutoIt3\AutoIt3.exe Click Abort to stop the installation, Retry to try again, or Ignore to skip this file. #ce EndFunc Edited January 19, 2005 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Chris_1013 Posted January 20, 2005 Share Posted January 20, 2005 Just something I've noticed. When I download the beta I like to keep a version where the filename is tagged with the release date, but, if I change the name of the file in the download dialog, it doesn't automatically tag .exe onto the end. Still runs it OK when I hit Open on the download progress box mind... Link to comment Share on other sites More sharing options...
therks Posted January 20, 2005 Share Posted January 20, 2005 (edited) Hmm.. not sure how I could work around that... I tried setting the file filter to *.exe, hoping it was part of the FileOpenDialog that took care of that, but apparently not. I guess I could have it check to see if the filename has quotes in it, and if it does then leave it as-is, but otherwise force .exe on the end. Does that sound good? *Edit: Scratch that, I wasn't thinking properly, it doesn't tell you if there's quotes in the file dialog of course, cus it returns a path. I'm just going to force .exe on the end regardless. I mean, it is an executable file, no need saving it as something else. Edited January 20, 2005 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Chris_1013 Posted January 20, 2005 Share Posted January 20, 2005 Why don't you just grab the last three characters of the filename returned from the FileOpenDialog and see if they are .exe, and if not then append it on as the file to download to? Link to comment Share on other sites More sharing options...
therks Posted January 20, 2005 Share Posted January 20, 2005 Why don't you just grab the last three characters of the filename returned from the FileOpenDialog and see if they are .exe, and if not then append it on as the file to download to?<{POST_SNAPBACK}>You reply too fast See the edit of my post above(Btw, ".exe" would be 4 characters otherwise the filename could be "fooexe" and no .exe would be appended) My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
therks Posted January 21, 2005 Share Posted January 21, 2005 Okay, here we go, this one is a little remodeled. I followed josbe's suggestion and put the download dialog right into the main one. I also added his checkbox suggestions in, although I used radios instead. I write a few values to the registry, hopefully that's not a problem. I just used a subkey of the current users AutoIt key (HKCU\Software\AutoIt v3\AutoUpdateIt). But I use it just to remember a few things (ie: last download directory). Okay, so, comments, critiques, etc. I still plan on making a command line switch to do a more automated download. /release Would download the public release /beta Would download the beta In either case it would download the install to the tempdir and start it. Also thinking of adding a /silent option, which would download whichever version, then use the silent install option of it. That way you couldn't accidentally lose your settings. Then it'd be your own fault for using the /silent parameter. Anyway, gotta go. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Administrators Jon Posted January 21, 2005 Author Administrators Share Posted January 21, 2005 Okay, here we go, this one is a little remodeled. I followed josbe's suggestion and put the download dialog right into the main one. I also added his checkbox suggestions in, although I used radios instead.I write a few values to the registry, hopefully that's not a problem. I just used a subkey of the current users AutoIt key (HKCU\Software\AutoIt v3\AutoUpdateIt). But I use it just to remember a few things (ie: last download directory).Okay, so, comments, critiques, etc.I still plan on making a command line switch to do a more automated download. /release Would download the public release/beta Would download the betaIn either case it would download the install to the tempdir and start it.Also thinking of adding a /silent option, which would download whichever version, then use the silent install option of it. That way you couldn't accidentally lose your settings. Then it'd be your own fault for using the /silent parameter.Anyway, gotta go.Wonderful. Do you mind if I start including it in the installer now? (Of course I'm sure there will be changes yet but I'd like to have it there ready).My only comments on this version where to get rid of everything in the about box apart from your name and the function of the app. Apart from that I like it alot and the code is very neat so it would be useful for others to see what a fully working app looks like Now, do we need a whizzy animation while downloading too? Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to comment Share on other sites More sharing options...
ioliver Posted January 21, 2005 Share Posted January 21, 2005 Great Job Saunders, I just used your script to upgrade to the latest Beta. Untill now, I had only looked at the GUI. But, the script works fine for downloading and launching the installation. Thanks again for your hard work, Ian "Blessed be the name of the Lord" - Job 1:21Check out Search IMF Link to comment Share on other sites More sharing options...
zcoacoaz Posted January 21, 2005 Share Posted January 21, 2005 now the gui looks a little empty... maybe add an option or two where there is blank space, it's probably just me being my weird self tho [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
killaz219 Posted January 22, 2005 Share Posted January 22, 2005 I would compliment you, but it isnt working for me (prolly my network messed up again) Anyways good job Link to comment Share on other sites More sharing options...
therks Posted January 22, 2005 Share Posted January 22, 2005 Wonderful. Do you mind if I start including it in the installer now? (Of course I'm sure there will be changes yet but I'd like to have it there ready).Of course not, go ahead. That's what it's here for. My only comments on this version where to get rid of everything in the about box apart from your name and the function of the app.Aw, now I have to write a description about the application. I'm horrible at writing stuff like that...Ah well, how's this sound?AutoIt3 Update UtilityThis application is a utility for easily receiving the most recent public release or beta version of AutoIt available. It was written completely in AutoIt script by Rob Saunders.@Xenogis: Yeah I kinda thought that myself, but I can't think of anything to put in that blank area. At first I was going to put the radio controls there, but then I figured I'd rather have them stay when the download display appears, in case someone changes their mind about autoopening while it's downloading. Just now I even tried out just putting a link to the site there, just to fill up the space you know? But it didn't look very good. Oh I know, maybe I'll just put an AutoIt graphic there. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
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