buzz44 1 Posted January 4, 2005 (edited) hello all, this is in relation to batfastas's topic in the support forum. if you all could plz read the script below $copy = FileCopy ( "C:\Program Files\Diablo II\d2data.mpq", "C:\Documents and Settings\test\Desktop\d2data.mpq") If FileExists ( "C:\Documents and Settings\test\Desktop\d2data.mpq" ) = 1 then msgbox(0,"","didnt work??") Endif Do $origfilesize = FileGetSize( "C:\Program Files\Diablo II\d2data.mpq" ) $copyfilesize = FileGetSize( "C:\Documents and Settings\test\Desktop\d2data.mpq" ) $percent = $copyfilesize / $origfilesize * 100 ProgressOn("Progress Meter", "") ProgressSet($percent) Sleep(1000) Until $copy = 1 this code is simply supposed to copy a file from one place to another and show me its progress, the problem is the progress bar doesnt come up until the file has finished copying, same with the msg box, is there a way i can make the progresss bar start while the file is still copying? edit: also is there a way i can declare a variable with out it actaully runing ie. $copy = FileCopy ( "C:\Program Files\Diablo II\d2data.mpq", "C:\Documents and Settings\test\Desktop\d2data.mpq") declare it but dont do it... Edited September 29, 2010 by buzz44 qq Share this post Link to post Share on other sites
Holger 14 Posted January 4, 2005 Fast: You should put ProgressOn("Progress Meter", "") bfore you start the process Old project:GUI/Tray menu with icons and colorsOther old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView Share this post Link to post Share on other sites
HighGuy 0 Posted January 4, 2005 Your script is waiting until FileCopy is finished. You have to use an external copy-program (f.ex. %comspec% /c copy) and start it with Run(). Afterwards you can check the sizes in a loop until $copyfilesize = $origfilesize Share this post Link to post Share on other sites
buzz44 1 Posted January 4, 2005 Your script is waiting until FileCopy is finished. You have to use an external copy-program (f.ex. %comspec% /c copy) and start it with Run(). Afterwards you can check the sizes in a loop until $copyfilesize = $origfilesize<{POST_SNAPBACK}>thanks for the help, i think its the key , problem but lol, when i try write "c:\program files\diablo II\d2data.mpq" using autoit ie, using Run("cmd.exe") or Comspec, i get an error like the it, saying unable to parse line, and the ^ points at the colon after the C:, any help qq Share this post Link to post Share on other sites
Chris_1013 0 Posted January 4, 2005 Ah, sounds to me like a quotes in quotes issue. If you post the whole line we might be able to debug it. Share this post Link to post Share on other sites
ezzetabi 3 Posted January 4, 2005 (edited) Edit: Ops... I was wrong. Sorry.Similar topic... with the solution of mine:Just a click away... Edited January 4, 2005 by ezzetabi Share this post Link to post Share on other sites
buzz44 1 Posted January 4, 2005 Ah, sounds to me like a quotes in quotes issue. If you post the whole line we might be able to debug it.<{POST_SNAPBACK}> yeah it is, ive got the right number of them in there but.Run("cmd.exe" & "copy "c:\program files\diablo II\d2data.mpq" c:\temp\d2data.mpq") qq Share this post Link to post Share on other sites
MHz 80 Posted January 4, 2005 This should be in support forum? Here is your line corrected. Notice single quotes and double quotes.Run('cmd.exe copy "c:\program files\diablo II\d2data.mpq" c:\temp\d2data.mpq') Share this post Link to post Share on other sites
buzz44 1 Posted January 4, 2005 This should be in support forum?Here is your line corrected. Notice single quotes and double quotes.Run('cmd.exe copy "c:\program files\diablo II\d2data.mpq" c:\temp\d2data.mpq')<{POST_SNAPBACK}>hey, thankyou works great, ya i wasnt sure were to put it, it did start with a script but , thankyou everyone i think ill b fine now qq Share this post Link to post Share on other sites
sugi 0 Posted January 4, 2005 Run('cmd.exe copy "c:\program files\diablo II\d2data.mpq" c:\temp\d2data.mpq')Run(@ComSpec & ' /c copy "c:\program files\diablo II\d2data.mpq" c:\temp\d2data.mpq') Share this post Link to post Share on other sites