المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : إظهار رسائل بأسماء الملفات المُحددة FileBrowse


أبو محسن
18-10-2014, 07:30 PM
بسم الله
السلام عليكم

لدي سؤال عن هذا الكود


-- Prompt the user to select files to add to the zip archive.
archive_files = Dialog.FileBrowse(true, "Files to Add", _DesktopFolder, "All Files (*.*)|*.*|", "", "dat", true, false);

-- Check to see if an error occurred, or the user cancelled.
if (archive_files[1] ~= "CANCEL") and (archive_files ~= nil) then

-- Add the chosen files to the zip archive.
Dialog.Message("Notice", archive_files[1], MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

-- Get the error code of the zip.add action.
error = Application.GetLastError();

-- If it succeeded, display a success message and open the folder. Otherwise display the error message.
if (error == 0) then
Dialog.Message("Success", "The files were successfully archived.", MB_OK, MB_ICONINFORMATION);

else
Dialog.Message("Error", _tblErrorMessages[error], MB_OK, MB_ICONEXCLAMATION);
end
end


الكود السابق.. يقوم بإضهار أسم ملف واحد, من عدة ملفات مُحددة !!

كيف يمكنني إظهار جميع الملفات برسائل متتالية.
أو نسخ المفات المُحددة إلى مسار مُحدد, وليكن سطح المكتب

وشكراً لكم :)

ثامر أبو بلقيس
19-10-2014, 09:37 AM
archive_files = Dialog.FileBrowse(true, "Files to Add", _DesktopFolder, "All Files (*.*)|*.*|", "", "dat", true, false);
for c ,y in pairs( archive_files) do
Dialog.Message("Notice", y, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end

ثامر أبو بلقيس
19-10-2014, 09:45 AM
archive_files = Dialog.FileBrowse(true, "Files to Add", _DesktopFolder, "All Files (*.*)|*.*|", "", "dat", true, false);
r = ""
for c ,y in pairs( archive_files) do
r=r..y.."\r\n"
end
TextFile.WriteFromString(_DesktopFolder.."\\MyFile.txt", r, false);

أبو محسن
22-10-2014, 10:46 AM
جزاك الله خير وبارك فيك
جميل جداً

الله يوفقك دُنيا وآخرة