برنامه autoplay media studio سوال دارم؟؟؟

fatemeh.

New Member
سلام
من می خوام یک برنامه اتوران ایجاد کنم، که هم فایل فیلم باشد و هم نصب برنامه،و در چند dvd ذخیره کنم.
من برای جستجوی فایل ،یک سری کد نوشته ام ، اما اون کاری که می خوام صورت نمیگیره،
در واقع من می خوام در صورتی که نام فایلی را در inputbox وارد کردم و کلمه جستجو را زدم،فایل را در لیست باکس نمایش دهد و یا پیغامی ظاهر شود که در این DVD نیست.
اما جستجوی من فایل را باز می کند و من به صورت دستی باید پیدا کنم، در صورتی که من می خواک برنامه خودش این کار رو انجام بده،
برنامه جستجو
ListBox.SetUpdate("ListBox1",false);
--folder = Dialog.FolderBrowse("Open Folder","D:\\Mishael\\");
--files = Dialog.FileBrowse(true, "Open File", _ProgramFilesFolder, "Text File (*.jpg)|*.jpg|All Files(*.*)|*.*|", "", "", false, false);


-- Set the drive to search
drive = "D:\\";
-- Set the folder to search for
folder = "Pic";
-- Search the specified drive for folders named "windows"
-- Display the status dialog
StatusDlg.Show(0, false);
search_results = Folder.Find(drive, folder, true, FindCallBack);
--Check to see if an error occurred during the search. If it did, display the error message.
--Dialog.ComboBox("Select Lunch","Please select the the filepath:",search_results,"Apple",false,false,MB_ICONQUESTION);




error = Application.GetLastError();
StatusDlg.Hide();


if error ~= 0 then
Dialog.Message("Error",_tblErrorMessages[error]);
else
-- If no directories were found, inform the user
if (search_results == nil) then
Dialog.Message("Notice", "There are no folders named '" .. folder .. "' on drive '" .. drive .. "'.");
-- If folders were found, display a dialog containing a list of their locations.
else
message = folder ;
for index, path in pairs(search_results) do
message = String.Concat(message, path.."\r\n");
end
--Dialog.Message("File Search Results", message, MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
ComboBox.AddItem("ComboBox1",message);
ListBox.AddItem("ListBox2",message);
end
end


file_jpg = File.Find(folder, "*.jpg",false,false,nil);
file_png = File.Find(folder, "*.png",false,false,nil);
images = {file_jpg , file_png};


--strSelected = Dialog.ComboBox("Select Lunch","Please select the the filepath:",images,"Apple",false,false,MB_ICONQUESTION);


for k in pairs(images) do
for j,file_path in pairs(images[k]) do
ListBox.AddItem("ListBox2",String.SplitPath(file_path).Filename,file_path);
end
end


ListBox.SetUpdate("ListBox1",true);

برنامه باز کردن فایل از لیست باکس
selected = ListBox.GetSelected("ListBox2");
file = ListBox.GetItemData("ListBox2" , selected[1]);
File.Open(file , "" , SW_SHOWNORMAL);


لطفا راهنمایی کنید، خیلی برام مهمه.
ممنون
 

جدیدترین ارسال ها

بالا