goodbyeplanet Posted November 1, 2010 Share Posted November 1, 2010 (edited) I need a progress bar to show during installation of my applications. from the help file this is what i managed to come up with. Thank you for your help while 1 ProgressOn("Progress Bar", "Sample progress bar", "Working...") For $i = 0 To 100 ProgressSet($i) Sleep(5) Next ProgressSet(100, "Done!") Sleep(750) ProgressOff() runwait("applications\" & $dir & "\autosetup.au3","applications\" & $dir) wend Edited November 1, 2010 by goodbyeplanet Link to comment Share on other sites More sharing options...
ZacUSNYR Posted November 1, 2010 Share Posted November 1, 2010 Your progress bar is done before you even kick off the run. Link to comment Share on other sites More sharing options...
goodbyeplanet Posted November 1, 2010 Author Share Posted November 1, 2010 Your progress bar is done before you even kick off the run. ja sure i have also tried below but i am kinda confused where i should position my runwait statement. sorry i am still learning autoit while 1 ProgressOn("Progress Bar", "Sample progress bar", "Working...") For $i = 0 To 100 runwait("applications\" & $dir & "\autosetup.au3","applications\" & $dir) ProgressSet($i) Sleep(5) Next ProgressSet(100, "Done!") Sleep(750) ProgressOff() wend Link to comment Share on other sites More sharing options...
wakillon Posted November 1, 2010 Share Posted November 1, 2010 you have several solutions for follow progress installby output give by installer, time if you know it or directory size...like that #include <Math.au3> ; simulation of the freeware FairStars CD Ripper Installation ( http://www.fairstars.com/download/fscdripper_setup.exe ) ; dirgetsize of @ProgramFilesDir & '\FairStars CD Ripper' give 6331609 bits after install. $_Pid = Run ( @DesktopDir & '\fscdripper_setup.exe /VERYSILENT /SP-' ) ProgressOn ( "Progress Bar", "Install of FairStars CD Ripper", "Working..." ) While ProcessExists ( $_Pid ) $_DirSize = DirGetSize ( @ProgramFilesDir & '\FairStars CD Ripper' ) If $_DirSize Then $_Percent = $_DirSize*100/6331609 $_Percent = _Max ( _Min ( $_Percent, 99 ), 1 ) ProgressSet ( $_Percent ) EndIf Sleep ( 100 ) WEnd ProgressSet ( 100, "Done !" ) Sleep ( 2000 ) ProgressOff ( ) AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
goodbyeplanet Posted November 2, 2010 Author Share Posted November 2, 2010 Thanks wakillon, while i didnt get a solution yet because of my many applications at least I have an idea of how it can be done after reviewing your example..thanks again for your help Link to comment Share on other sites More sharing options...
wakillon Posted November 2, 2010 Share Posted November 2, 2010 Glad to help you !The most incovenient of this method is to do a first install for get directory size ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts 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