t0ddie Posted October 28, 2005 Share Posted October 28, 2005 (edited) i want to add a function to my program that will simply check for new versions as they are availabe. i tried simply putting a text file with the current version (1.0) on my webserver so that my program can check the version against itself, and get the new file if one is available (ie: 1.1) but.. when i use inetgetfile to download the text file it is blank. maybe im not doing something right.. but i DO get the file.. its just blank. if there is another method to do what i want i am open to suggestions. ill check later.. its past my bedtime. Edited October 28, 2005 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
hankjrfan Posted October 28, 2005 Share Posted October 28, 2005 How about posting your code or atleast the relevant part of it. Also can you open the file straight from internet explorer and if so does it contain the data it is supposed to. Link to comment Share on other sites More sharing options...
t0ddie Posted October 28, 2005 Author Share Posted October 28, 2005 (edited) How about posting your code or atleast the relevant part of it.Also can you open the file straight from internet explorer and if so does it contain the data it is supposed to.i deleted it along time ago.. but its just one like pretty muchwhen a button is clicked in my gui.. it does this.InetGet("http://www.somesite.com/file.txt", "C:\file.txt", 1)i noticed in the helpfile there is an ftp example... maybe thats why its not working... should it be more like this?InetGet("ftp://www.somesite.com/file.txt", "C:\file.txt", 1)and yes i can see the data when accessing the file on my browser.but the help file shows 2 different ways... and they both give files.from the help file...InetGet("ftp://ftp.mozilla.org/pub/mozilla.org/README", "README.txt", 1) ; Advanced example - downloading in the background InetGet("http://www.nowhere.com/somelargefile.exe", "test.exe", 1, 1) Edited October 28, 2005 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
hankjrfan Posted October 28, 2005 Share Posted October 28, 2005 Very odd. I see no reason why it should not work. Have you tried checking to see if Inetget returns an error after the command? Link to comment Share on other sites More sharing options...
t0ddie Posted October 28, 2005 Author Share Posted October 28, 2005 well.. i will check later... and post results. going to bed (finally) p.s. i get the file.. so i dont know if there would be an error. its just the file is blank! lol... enough! bed awaits Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
t0ddie Posted October 30, 2005 Author Share Posted October 30, 2005 (edited) edit: here you can see i get the file, but it is blank. open the page in a browser and it should say 1.0 InetGet("http://www.angelfire.com/ex/u/update.txt","C:\Documents and Settings\Administrator\Desktop\update.txt",1,1) Edited October 30, 2005 by t0ddie Valik Note Added 19 October 2006 - 08:38 AMAdded to warn level I just plain don't like you. Link to comment Share on other sites More sharing options...
Valik Posted October 30, 2005 Share Posted October 30, 2005 Well, let's think about that particular piece of code, shall we? First parameter looks okay. Second parameter is stupidly done (Should use @DesktopDir marcro) but it is passable. Third parameter makes sense. Lets look at that 4th parameter. You want the file to be downloaded in the background, eh? No problem there. Lets see what appears after the InetGet() call then. Why, nothing appears. That means... wait for it, well maybe not wait for it since that's what AutoIt is not doing since you've just told it to download a file asynchronously and then promptly let the script end. Do you expect AutoIt to wait for a file to download when you specifically tell it not to wait? Try this code which is better all around since it works and works as is on any machine without having to be modified to fix an invalid path:InetGet("http://www.angelfire.com/ex/u/update.txt", @DesktopDir & "\t0ddie.is.an.idiot.txt", 1)Really, after all this time, how can you be making such stupid mistakes? Are you ever going to learn the language? 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