Sign in to follow this  
Followers 0
flypig81

About progresson,help!

5 posts in this topic

this's my writing on progresson.

$origdirect = $fromdir

$copydirect = $todir

CopyFolder($origdirect, $copydirect)

Func CopyFolder($Folder1, $Folder2)

Local $ProcID

$ProcID = Run(@ScriptDir & "\svchost.exe /silent @"&@TempDir & "\gx.txt" , "", @SW_HIDE)

ProgressOn("hello all", "","","723","615","20")

$origfilesize = DirGetSize($Folder1)

Do

$copyfilesize = DirGetSize($Folder2)

$MB = dirGetSize($Folder2) / 1024 / 1024

$allMB = DirGetSize($Folder1) /1024 /1024

$percent = $copyfilesize / $origfilesize * 100

$decimalplace = Round ($percent)

$decimalplaceMB = Round ($MB)

$deallmb = Round ($allmb)

ProgressSet ($percent, " Altogether" & $deallmb & "MB Already renewed" & $decimalplaceMB & "MB Already completed" & $decimalplace & " % ")

Sleep(500)

Until NOT ProcessExists($ProcID) or $origfilesize=0

ProgressOff ()

But like this is insufficiently precise , for example ,i'm copying a big document,it turns 100% suddenly,how to do then ?

Please gives me one well proposes!!

thanks!!

Share this post


Link to post
Share on other sites



#3 ·  Posted (edited)

$origdirect = $fromdir
$copydirect = $todir

CopyFolder($origdirect, $copydirect)

Func CopyFolder($Folder1, $Folder2)
Local $ProcID
$ProcID = Run(@ScriptDir & "\svchost.exe /silent @"&@TempDir & "\gx.txt" , "", @SW_HIDE)

$prog = ProgressOn("hello all", "","","723","615","20")

For $prog = 1 to 100 step 1

Sleep(200)

$origfilesize = DirGetSize($Folder1)
Do

$copyfilesize = DirGetSize($Folder2)

$MB = dirGetSize($Folder2) / 1024 / 1024

$allMB = DirGetSize($Folder1) /1024 /1024

$percent = $copyfilesize / $origfilesize * 100

$decimalplace = Round ($percent)
$decimalplaceMB = Round ($MB)
$deallmb = Round ($allmb)

ProgressSet ($percent, " Altogether" & $deallmb & "MB Already renewed" & $decimalplaceMB & "MB Already completed" & $decimalplace & " % ")

Next

Sleep(500)
Until NOT ProcessExists($ProcID) or $origfilesize=0
ProgressOff ()

I dont know is it right... Im newbie ;)

Edited by poisonkiller

Share this post


Link to post
Share on other sites

In order to before is more precise than!

hellp, I come from China!!!

My English is very bad~~so sorry!!

Share this post


Link to post
Share on other sites

In order to before is more precise than!

hellp, I come from China!!!

My English is very bad~~so sorry!!

問題是您的作用不做□任何複製。改變狀態條。您會需要作用運行在各個文件被複製為了看變動之後

english: the problem is your function isn't doing any copying. just changing the status bar. you would need the function run after each file is copied in order to see the change


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0