View Full Version : progress bar... how to use with exemple... pls
valym23
03-27-2009, 07:41 AM
Hy programmers...
I have a project that is in 98% finished. This part with progress bar I do not know how to introduce it in script...
I have some files which I have renamed running a dos command file through a .cmd in a folder. After that I have to check the existence of those files renamed so that I can delete the original. Until here everything is ok. But because computer has a latency in copy process of many files, i have to replace it with a progress bar that show me the proces of command file.
How can i do this?
jassing
03-27-2009, 08:19 PM
Ditch the batch file / dos copy -- copy it via lua and use callback function to display the progress...
valym23
03-28-2009, 03:41 PM
Ditch the batch file / dos copy -- copy it via lua and use callback function to display the progress...
That's my problem, I said it!!!!!:huh
How can i do this? i don't know how...
jassing
03-28-2009, 03:50 PM
Check the help file... it's pretty good at explaining the use of callback functions & File.Copy() with it...
Give it a go & post your code if you're having trouble.
valym23
03-31-2009, 02:38 AM
files = Dialog.FileBrowse(true, "Locate File", _DesktopFolder, "001, 002, 003, 004, 005, 006, 007, 008 |*.001; *.002; *.003; *.004; *.005; *.006; *.007; *.008; *.009; *.010; *.011; *.012; *.013; *.014; *.015; *.016; *.017; *.018; *.019; *.020|", "", "dat", true, false);
if (files[1]~="Cancel") then
for i, v in files do
if (File.DoesExist(v)) then
File.Copy(v, "C:\\", true, true, true, true, nil);
StatusDlg.Show(MB_ICONNONE, false);
end
end
end
This is one of my scripts... I want to copy some files that have that extensions (001, 002, 003, etc) to "C:\" directory. It seems that with "StatusDlg" function that i used like in exemple of Help, after the files are copied, it's stuked!!! And i have to terminate my application by closing it from Task Manager!
jassing
03-31-2009, 10:15 AM
Show the statusdlg before you do the copy
hide the statusdlg after you do the copy
valym23
04-01-2009, 12:32 AM
Show the statusdlg before you do the copy
hide the statusdlg after you do the copy
Oh... Thanks, i didn't know that...:yes
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.