buzz44 Posted January 4, 2005 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
Holger Posted January 4, 2005 Posted January 4, 2005 Fast: You should put ProgressOn("Progress Meter", "") bfore you start the process Old project:GUI/Tray menu with icons and colors Other old stuff:IconFileScanner, TriState/ThreeState GUI TreeView, GUI ContextMenu created out of a TreeView
HighGuy Posted January 4, 2005 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
buzz44 Posted January 4, 2005 Author 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
Chris_1013 Posted January 4, 2005 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.
ezzetabi Posted January 4, 2005 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
buzz44 Posted January 4, 2005 Author 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
MHz Posted January 4, 2005 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')
buzz44 Posted January 4, 2005 Author 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
sugi Posted January 4, 2005 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')
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