cellini Posted April 7, 2007 Share Posted April 7, 2007 the msgbox is just empty can sombody give me the cod to get it to wurk CODE$name = "http://www.zeronero.net/lan/news.txt" $config = "http://www.zeronero.net/lan/config.txt" $file = FileOpen($name, 0) $hei2 = FileRead($file) MsgBox(0,"100",$hei2) Link to comment Share on other sites More sharing options...
Zedna Posted April 7, 2007 Share Posted April 7, 2007 use InetGet to download it to local disk and then use FileRead Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
cellini Posted April 7, 2007 Author Share Posted April 7, 2007 use InetGet to download it to local diskand then use FileReadok thanx Link to comment Share on other sites More sharing options...
Helge Posted April 7, 2007 Share Posted April 7, 2007 #include <INet.au3> $sSource = _INetGetSource("http://www.zeronero.net/lan/config.txt") MsgBox(64, "", $sSource) Link to comment Share on other sites More sharing options...
cellini Posted April 7, 2007 Author Share Posted April 7, 2007 it wurks fine but i can i include the variable that is in "http://www.zeronero.net/lan/config.txt" so that when i update "http://www.zeronero.net/lan/config.txt" the script change? Link to comment Share on other sites More sharing options...
The Kandie Man Posted April 7, 2007 Share Posted April 7, 2007 You shouldn't have it setup that way. The way you have it setup is the way you would set up variables in a script. Use an INI file to store the information. config.txt[Config] version=2.0 sleeptime1=1000 sleeptime2=15000 Then use InetGet() to retrieve the file to a temporary location. Once you do that, use INIRead() to retrieve the version information. InetGet ( "http://www.zeronero.net/lan/config.txt" ,@TempDir & "\tmpconfig.txt" ,1 ) $s_Version = IniRead(@TempDir & "\tmpconfig.txt","Config","version",-1) If $s_Version = -1 Then Msgbox(0,"Error","Could not read the requested value from the INI file.") Else Msgbox(0,"The version is:",$s_Version) EndIf "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
cellini Posted April 7, 2007 Author Share Posted April 7, 2007 now the file wont update CODE #include <INet.au3> $scriptverson = "0,0" $name = "http://www.zeronero.net/lan/var.php" $config = "http://www.zeronero.net/lan/config.txt" $configDo = _INetGetSource($config) $nameDo = _INetGetSource($name) $size=InetGetSize ( "http://www.zeronero.net/lan/lan.exe" ) InetGet ( $config ,@TempDir & "\tmpconfig.txt" ,1 ) $s_Version = IniRead(@TempDir & "\tmpconfig.txt","Config","version",-1) If $s_Version > $scriptverson Then Msgbox(0,"Error","The verson of this file is "&$scriptverson&" and the new update is "&$s_Version&" the script will now update the new file is "&$size&" bytes big.",5) InetGet ( "http://www.zeronero.net/lan/lan.exe", @TempDir & "\tmplan.exe" ) $coppy=FileCopy ( @TempDir & "\tmplan.exe", @ScriptFullPath , 9 ) If $coppy = 1 then msgbox(1,"adad","the update was a sucses") Else Msgbox(0,"The version is:",$s_Version) EndIf it want do it sucsesful when i convurted it to a exe it wuld just do it as a .au3 file 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