Venigo^ Posted June 15, 2006 Share Posted June 15, 2006 Hello, I'm making a file updater/download but i can't see the progress bar. It download's the files and he shows also the current version. But it shows not the progress bar, What im doing wrong? InetGet("http://www.lima-cs.nl/lp/update.ini","update.ini",1) $ver = IniRead("update.ini","DLL","version",0) $curr_ver = IniRead("current.ini","DLL","version",0) If $ver > $curr_ver Then InetGet("http://www.lima-cs.nl/lp/steam.dll", "steam.dll", 1, 0) InetGet("http://www.lima-cs.nl/lp/steamemu.ini", "steamemu.ini", 1, 0) InetGet("http://www.lima-cs.nl/lp/steamapps.ini", "steamapps.ini", 1, 0) While @InetGetActive $FileSize1 = InetGetSize("http://www.lima-cs.nl/lp/steam.dll") $FileSize2 = InetGetSize("http://www.lima-cs.nl/lp/steamemu.ini") $FileSize3 = InetGetSize ("http://www.lima-cs.nl/lp/steamapps.ini") $filedownload = round(@InetGetBytesRead/1048576, 5) $Percent = $filedownload/$FileSize1/$FileSize2/$FileSize3 ProgressOn("LimA Productions - Updating","Updating right now...") ProgressSet($Percent,"Downloaded - " & $filedownload & " Mb") TrayTip("Downloading...", "Downloaded = " & $filedownload & " Mb", 10, 16) Sleep(500) Wend IniWrite("current.ini","DLL","version",$ver) ProgressOff() Else TrayTip("Newest version","You have currently the newest version!",10) Sleep(2000) EndIf Link to comment Share on other sites More sharing options...
Venigo^ Posted June 15, 2006 Author Share Posted June 15, 2006 Nobody who can help me? Link to comment Share on other sites More sharing options...
Valuater Posted June 15, 2006 Share Posted June 15, 2006 you did not read the help file correctly you can only download one file at a time... ********** not tested expandcollapse popupInetGet("http://www.lima-cs.nl/lp/update.ini", "update.ini", 1) $ver = IniRead("update.ini", "DLL", "version", 0) $curr_ver = IniRead("current.ini", "DLL", "version", 0) If $ver > $curr_ver Then wait_active("http://www.lima-cs.nl/lp/steam.dll", "steam.dll") Sleep(500) wait_active("http://www.lima-cs.nl/lp/steamemu.ini", "steamemu.ini") Sleep(500) wait_active("http://www.lima-cs.nl/lp/steamapps.ini", "steamapps.ini") Else TrayTip("Newest version", "You have currently the newest version!", 10) Sleep(2000) EndIf Func wait_active($file, $name) $FileSize1 = InetGetSize($file) InetGet($file, $name, 1, 1) ProgressOn("LimA Productions - Updating", "Updating right now...") While @InetGetActive $filedownload = Round(@InetGetBytesRead / 1048576, 5) $Percent = $filedownload / $FileSize1 ProgressSet($Percent, "Downloaded - " & $filedownload & " Mb") TrayTip("Downloading...", "Downloaded = " & $filedownload & " Mb", 10, 16) Sleep(250) WEnd IniWrite("current.ini", "DLL", "version", $ver) ProgressOff() Sleep(500) EndFunc ;==>wait_active 8) Link to comment Share on other sites More sharing options...
Venigo^ Posted June 16, 2006 Author Share Posted June 16, 2006 (edited) Thanks mate it works Another question how do i make a windows with a button check for updates and then show a progress bar? Greets. Edited June 16, 2006 by Venigo^ Link to comment Share on other sites More sharing options...
Valuater Posted June 16, 2006 Share Posted June 16, 2006 Thanks mate it works Another question how do i make a windows with a button check for updates and then show a progress bar?Greets.as you did before...you try, i helpi dont just write scripts ( all the time )8) Link to comment Share on other sites More sharing options...
Venigo^ Posted June 16, 2006 Author Share Posted June 16, 2006 as you did before...you try, i helpi dont just write scripts ( all the time )8)But how do i make a window with a button?8) Link to comment Share on other sites More sharing options...
Valuater Posted June 16, 2006 Share Posted June 16, 2006 click "welcome to Autoit 1-2-3" below this will help you tremendously get beta and SciTE editor... and learn alot quickly 8) Link to comment Share on other sites More sharing options...
Venigo^ Posted June 16, 2006 Author Share Posted June 16, 2006 (edited) click "welcome to Autoit 1-2-3" belowthis will help you tremendouslyget beta and SciTE editor... and learn alot quickly8)I have the scite editor .I will read today that topic.Ty.Greetings.Edit:I have followed the tool but i still don't know how to make a windows etc .Im now gonna sleep .Seeu @ mid day Edited June 16, 2006 by Venigo^ Link to comment Share on other sites More sharing options...
Venigo^ Posted June 16, 2006 Author Share Posted June 16, 2006 I have it working, But the windows open only is i sleect one second i want it to op 3 micro seconds.. My code for now: expandcollapse popup#include <GUIConstants.au3> Opt("GUIOnEventMode",1) GUICreate("Steam emu updater - LimA Productions", 210, 80) $Label = GUICtrlCreateLabel("Dow you want to Update the Steam emu?", 10, 10) $YesID = GUICtrlCreateButton("Yes", 10, 50, 50, 20) GUICtrlSetOnEvent($YesID,"OnYes") $NoID = GUICtrlCreateButton("No", 80, 50, 50, 20) GUICtrlSetOnEvent($NoID,"OnNo") $ExitID = GUICtrlCreateButton("Exit", 150, 50, 50, 20) GUICtrlSetOnEvent($ExitID,"OnExit") GUISetOnEvent($GUI_EVENT_CLOSE,"OnExit") GUISetState() ; display the GUI While 1 Sleep (1000) WEnd ;--------------- Functions --------------- Func OnYes() MsgBox(0,"Steam emu updater - LimA Productions", "Updating...", "0,2") InetGet("http://www.lima-cs.nl/lp/update.ini", "update.ini", 1) $ver = IniRead("update.ini", "DLL", "version", 0) $curr_ver = IniRead("current.ini", "DLL", "version", 0) If $ver > $curr_ver Then wait_active("http://www.lima-cs.nl/lp/steam.dll", "steam.dll") Sleep(500) wait_active("http://www.lima-cs.nl/lp/steamemu.ini", "steamemu.ini") Sleep(500) wait_active("http://www.lima-cs.nl/lp/steamapps.ini", "steamapps.ini") Else TrayTip("Newest version", "You have currently the newest version!", 10) Sleep(2000) EndIf IniWrite("current.ini", "DLL", "version", $ver) EndFunc) Func OnNo() if @GUI_CtrlId = $NoID Then MsgBox(0,"Steam emu updater - LimA Productions", "The steam emu updater will be closed.", "0,6") Else MsgBox(0,"Steam emu updater - LimA Productions", "It wil be closed now", "0,6") Endif Exit EndFunc) Func OnExit() if @GUI_CtrlId = $ExitId Then MsgBox(0,"Steam emu updater - LimA Productions", "The updater will now Exit", "0,6") Else MsgBox(0,"Steam emu updater - LimA Productions", "The updater will now be Closed", "0,6") EndIf Exit EndFunc Func wait_active($file, $name) $FileSize1 = InetGetSize($file) InetGet($file, $name, 1, 1) ProgressOn("LimA Productions - Updating", "Updating right now...") While @InetGetActive $filedownload = Round(@InetGetBytesRead / 1048576, 5) $Percent = $filedownload / $FileSize1 ProgressSet($Percent, "Downloaded - " & $filedownload & " Mb") TrayTip("Downloading...", "Downloaded = " & $filedownload & " Mb", 10, 16) Sleep(250) WEnd ProgressOff() Sleep(500) EndFunc ;==>wait_active Greets. Link to comment Share on other sites More sharing options...
Venigo^ Posted June 17, 2006 Author Share Posted June 17, 2006 Nobody who can tell how i must use micro seconds? Link to comment Share on other sites More sharing options...
exodius Posted June 18, 2006 Share Posted June 18, 2006 Nobody who can tell how i must use micro seconds? Sleep (1000) ; Sleep for 1 second Sleep (30000) ; Sleep for 30 seconds Link to comment Share on other sites More sharing options...
i542 Posted June 18, 2006 Share Posted June 18, 2006 (edited) Nobody who can tell how i must use micro seconds?Use this: 1 second = 1000ms 10 seconds = 10000ms 100 secs = 100000ms You can multiply it with 1000: 10 seconds*1000 = 10000ms. Here is help utilly: $input=InputBox("Transforming","Enter number of seconds to convert in microseconds") $result = $input*1000 MsgBox(64,"Transformed",$input &" second(s) = " & $result & " microseconds.") ;***** not tested ***** i542 EDIT: Is that helped? Edited June 18, 2006 by i542 I can do signature me. 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