AlmarM Posted April 21, 2009 Share Posted April 21, 2009 Hi, Is it possible to display a progress bar with FileOpen? AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Marlo Posted April 21, 2009 Share Posted April 21, 2009 You mean to display the progress of reading the file into memory or something? Click here for the best AutoIt help possible.Currently Working on: Autoit RAT Link to comment Share on other sites More sharing options...
AlmarM Posted April 21, 2009 Author Share Posted April 21, 2009 (edited) You mean to display the progress of reading the file into memory or something?I mean when the users pressed the button (... to browse), selects a file and presses ok.When the user pressed Ok so the fileopendialog closes the FileOpen starts.If the FileOpen has been started the progress bar should start (showing the %).Get it?AlmarMIt should display the progress of reading the file. Edited April 21, 2009 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
trancexx Posted April 21, 2009 Share Posted April 21, 2009 It should display the progress of reading the file.This goes off topic but...There are some things that should be done as fast as possible (and faster). Reading files is surely one of those.Why would you want to slow things down (to see the progress)? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
AlmarM Posted April 21, 2009 Author Share Posted April 21, 2009 This goes off topic but...There are some things that should be done as fast as possible (and faster). Reading files is surely one of those.Why would you want to slow things down (to see the progress)?Hmm... Looks cool Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
trancexx Posted April 21, 2009 Share Posted April 21, 2009 You should have said that earlier. That's a good reason ......not Like this maybe: expandcollapse popupOpt("MustDeclareVars", 1) ProgressOn("Reading File", "Reading", "", 100, 100) Global $sFile = @ScriptFullPath Global $iSize = FileGetSize($sFile) Global $iChunkSize = Ceiling($iSize / 20) Global $hFile = FileOpen($sFile, 0) Global $sRead For $i = 1 To 20 $sRead &= FileRead($hFile, $iChunkSize) If @error Then ExitLoop EndIf ProgressSet(5 * $i, 5 * $i & " percent") Sleep(50) Next FileClose($hFile) ProgressSet(100, "Done", "Complete") ConsoleWrite("! " & StringLen($sRead) & " " & $iSize & " " & $iChunkSize & @CRLF) Sleep(500) ConsoleWrite($sRead & @CRLF) ProgressOff() ♡♡♡ . eMyvnE 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